summaryrefslogtreecommitdiffstats
path: root/lib/facter/fqdn.rb
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2008-05-17 00:32:34 +1000
committerJames Turnbull <james@lovedthanlost.net>2008-05-17 00:32:34 +1000
commite02b0b386ed84384daeb2da0879bf215cfcfa2ef (patch)
tree36cdd5c3cc6143ce6faccb87ba6461bf5f481a29 /lib/facter/fqdn.rb
parent9c91a6d3fb9da933d8e1ba4149ee1b5587e6b007 (diff)
downloadfacter-e02b0b386ed84384daeb2da0879bf215cfcfa2ef.tar.gz
facter-e02b0b386ed84384daeb2da0879bf215cfcfa2ef.tar.xz
facter-e02b0b386ed84384daeb2da0879bf215cfcfa2ef.zip
Updated version. Moved most facts to seperate files.
Diffstat (limited to 'lib/facter/fqdn.rb')
-rw-r--r--lib/facter/fqdn.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/facter/fqdn.rb b/lib/facter/fqdn.rb
new file mode 100644
index 0000000..1a97401
--- /dev/null
+++ b/lib/facter/fqdn.rb
@@ -0,0 +1,10 @@
+ Facter.add(:fqdn) do setcode do
+ host = Facter.value(:hostname)
+ domain = Facter.value(:domain)
+ if host and domain
+ [host, domain].join(".")
+ else
+ nil
+ end
+ end
+ end