Files
puppet-openstacklib/lib/facter/os_service_default.rb
Alex Schultz 989d8e999a Add os_service_default fact
This change adds a custom fact called os_service_default, for use with
the openstack modules to provide the '<SERVICE DEFAULT>' string for
configurations.

Static external facts can be loaded from <MODULEPATH>/<MODULE>/facts.d/
starting with Puppet 3.4/Facter 2.0.1. Prior to this change, the static
facts needed to be placed in an environment specific location. For
Facter < 2.0.1, we are providing a regular ruby fact.

Change-Id: Id6eec6f96d545bb0054aad30bf359cf32521c83a
2015-10-02 14:33:05 -05:00

15 lines
387 B
Ruby

#
# This adds the os_service_default fact for people with facter < 2.0.1
# For people with facter >= 2.0.1, the facts.d/os_services_default.txt should
# provide this information
#
require 'puppet/util/package'
if Puppet::Util::Package.versioncmp(Facter.value(:facterversion), '2.0.1') < 0
Facter.add('os_service_default') do
setcode do
'<SERVICE DEFAULT>'
end
end
end