This patch augments the hostname and domain facts, providing a fully qualified domain name fact. This fact will aid the creation of a configurable "nodeid" client option to fact mapping.
Index: lib/facter.rb
===================================================================
--- lib/facter.rb (revision 165)
+++ lib/facter.rb (working copy)
@@ -773,6 +773,23 @@
end
end
+ Facter.add("FQDN") do
+ setcode do
+ fqdn = nil
+ name = Resolution.exec('hostname') or nil
+ if name
+ if name =~ /^([\w-]+)\.(.+)$/
+ fqdn = name
+ else
+ nil
+ end
+ fqdn
+ else
+ nil
+ end
+ end
+ end
+
Facter.add("IPAddress") do
setldapname "iphostnumber"
setcode do