summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@1f5c1d6a-bddf-0310-8f58-fc49e503516a>2006-09-19 06:06:56 +0000
committerluke <luke@1f5c1d6a-bddf-0310-8f58-fc49e503516a>2006-09-19 06:06:56 +0000
commitc96cf6a71874286fa7acff5a916f8a877f32a0f4 (patch)
tree89242fc2d00b93d596e8e345b27f5f12031ca2c3
parentfc9331a9b5feef11d68dff3813977b2533995f2f (diff)
Adding fqdn fact
git-svn-id: http://reductivelabs.com/svn/facter/trunk@166 1f5c1d6a-bddf-0310-8f58-fc49e503516a
-rw-r--r--lib/facter.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/facter.rb b/lib/facter.rb
index f799783..f1726cc 100644
--- a/lib/facter.rb
+++ b/lib/facter.rb
@@ -773,6 +773,18 @@ class Facter
end
end
+ 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
+
Facter.add("IPAddress") do
setldapname "iphostnumber"
setcode do