Created
August 11, 2015 22:00
-
-
Save binford2k/c142ce4b42a2169ffccb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Facter.add(:service_provider) do | |
setcode do | |
Puppet::Type.type(:service).newservice(:name => 'anyservice')[:provider].to_s | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks binford2k for creating my suggestion in a fact!
-- Speedr on #puppet
It may be useful to consider the function that goes with this fact as well.
https://github.com/sfu-rcg/puppet-sfu_stdlib/blob/master/lib/puppet/parser/functions/default_service_provider_merge.rb
Notes are all written in the rdoc for that function.
Name and methods of the function and fact are all up for discussion to make them more 'proper/conventional'