summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWilson McCoubrey <wilson@mccoubreys.co.uk>2016-12-20 12:23:58 +0000
committerGitHub <noreply@github.com>2016-12-20 12:23:58 +0000
commit7fe6f07c46c211adddf94197e06db8731bbe9430 (patch)
tree4df6ff669d96f2dc307b9dc53c8d083561736765 /lib
parent2894838c2dbb1439ba1a6d19f19737c76662473f (diff)
parentf81ba549b73f0d752be1b4185c73818f791ab2f6 (diff)
Merge pull request #613 from reidmv/add_puppet_server_fact
Add puppet_server fact to return agent's server
Diffstat (limited to 'lib')
-rw-r--r--lib/facter/puppet_settings.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/facter/puppet_settings.rb b/lib/facter/puppet_settings.rb
index e6a066a..eac9e97 100644
--- a/lib/facter/puppet_settings.rb
+++ b/lib/facter/puppet_settings.rb
@@ -33,3 +33,11 @@ Facter.add(:puppet_environmentpath) do
end
end
end
+
+Facter.add(:puppet_server) do
+ setcode do
+ Facter::Util::PuppetSettings.with_puppet do
+ Puppet[:server]
+ end
+ end
+end