summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/handler
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/network/handler')
-rw-r--r--lib/puppet/network/handler/master.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/network/handler/master.rb b/lib/puppet/network/handler/master.rb
index c728638b2..1082d3aaa 100644
--- a/lib/puppet/network/handler/master.rb
+++ b/lib/puppet/network/handler/master.rb
@@ -33,6 +33,15 @@ class Puppet::Network::Handler
Puppet.warning "Could not retrieve fact %s" % fact
end
end
+
+ if facts["servername"].nil?
+ host = Facter.value(:hostname)
+ if domain = Facter.value(:domain)
+ facts["servername"] = [host, domain].join(".")
+ else
+ facts["servername"] = host
+ end
+ end
end
# Manipulate the client name as appropriate.