HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //usr/share/ruby/vendor_ruby/facter/fqdn.rb
# Fact: fqdn
#
# Purpose: Returns the fully-qualified domain name of the host.
#
# Resolution: Simply joins the hostname fact with the domain name fact.
#
# Caveats: No attempt is made to check that the two facts are accurate or that
# the two facts go together. At no point is there any DNS resolution made
# either.
#

Facter.add(:fqdn) do
  setcode do
    host = Facter.value(:hostname)
    domain = Facter.value(:domain)
    if host and domain
      [host, domain].join(".")
    elsif host
      host
    else
      nil
    end
  end
end