custom: Added puppet_server fact
This commit is contained in:
parent
763589e731
commit
8986993b14
1 changed files with 10 additions and 0 deletions
10
custom/lib/facter/puppet_server.rb
Normal file
10
custom/lib/facter/puppet_server.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
require 'puppet'
|
||||
|
||||
Facter.add('puppet_server') do
|
||||
setcode do
|
||||
if Facter.value('puppetversion').to_i < 3
|
||||
Puppet.parse_config
|
||||
end
|
||||
Puppet.settings.value('server')
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue