summaryrefslogtreecommitdiffstats
path: root/lib/facter/hostname.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/facter/hostname.rb')
-rw-r--r--lib/facter/hostname.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/facter/hostname.rb b/lib/facter/hostname.rb
index 188efa4..0dcd01c 100644
--- a/lib/facter/hostname.rb
+++ b/lib/facter/hostname.rb
@@ -1,3 +1,16 @@
+# Fact: hostname
+#
+# Purpose: Return the system's short hostname.
+#
+# Resolution:
+# On all system bar Darwin, parses the output of the "hostname" system command
+# to everything before the first period.
+# On Darwin, uses the system configuration util to get the LocalHostName
+# variable.
+#
+# Caveats:
+#
+
Facter.add(:hostname, :ldapname => "cn") do
setcode do
hostname = nil