Sha256: 42c551068b8c2de72882ba8b240a1a0e3a6f5cd5293c0ce4118220ca4801cf42
Contents?: true
Size: 552 Bytes
Versions: 2
Compression:
Stored size: 552 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
facter-1.6.1 | lib/facter/fqdn.rb |
facter-1.6.0 | lib/facter/fqdn.rb |