summaryrefslogtreecommitdiffstats
path: root/lib/facter/fqdn.rb
blob: 5ebc5f5c0bad543ee23fa8c7134e3e8a25981b46 (plain)
1
2
3
4
5
6
7
8
9
10
11
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