10
11
12
13
14
15
16
17
18
|
# File 'lib/facter/facts/windows/networking/fqdn.rb', line 10
def call_the_resolver
domain = Facter::Resolvers::Windows::Networking.resolve(:domain)
hostname = Facter::Resolvers::Hostname.resolve(:hostname)
return Facter::ResolvedFact.new(FACT_NAME, nil) if !hostname || hostname.empty?
fact_value = domain && !domain.empty? ? [hostname, domain].compact.join('.') : hostname
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
|