Sha256: 875cc5d55d6755b3b9544750c06af9079a01096e7a65adb4558122d4b7553483

Contents?: true

Size: 516 Bytes

Versions: 71

Compression:

Stored size: 516 Bytes

Contents

# 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(".")
    else
      nil
    end
  end
end

Version data entries

71 entries across 71 versions & 3 rubygems

Version Path
facter-1.6.15 lib/facter/fqdn.rb
facter-1.6.15.rc1 lib/facter/fqdn.rb
facter-1.6.14 lib/facter/fqdn.rb
facter-1.6.14.rc1 lib/facter/fqdn.rb
facter-1.6.13 lib/facter/fqdn.rb
facter-1.6.13.rc1 lib/facter/fqdn.rb
facter-1.6.12 lib/facter/fqdn.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/facter-1.6.11/lib/facter/fqdn.rb
facter-1.6.12.rc2 lib/facter/fqdn.rb
facter-1.6.12.rc1 lib/facter/fqdn.rb
supply_drop-0.11.0 examples/vendored-puppet/vendor/facter-1.6.4/lib/facter/fqdn.rb
librarian-puppet-0.9.3 vendor/gems/ruby/1.8/gems/facter-1.6.11/lib/facter/fqdn.rb
facter-1.6.11 lib/facter/fqdn.rb
supply_drop-0.10.2 examples/vendored-puppet/vendor/facter-1.6.4/lib/facter/fqdn.rb
supply_drop-0.10.1 examples/vendored-puppet/vendor/facter-1.6.4/lib/facter/fqdn.rb
supply_drop-0.10.0 examples/vendored-puppet/vendor/facter-1.6.4/lib/facter/fqdn.rb
facter-1.6.10 lib/facter/fqdn.rb
facter-1.6.9 lib/facter/fqdn.rb
facter-1.6.8 lib/facter/fqdn.rb
supply_drop-0.9.0 examples/vendored-puppet/vendor/facter-1.6.4/lib/facter/fqdn.rb