Fix retrieval of hostname fact based on network.
When Facter.value(:domain) is nil the facts fqdn_<network> are failing with : Could not retrieve fact='fqdn_external', resolution='<anonymous>': undefined method `empty?' for nil:NilClass Change-Id: I3e7fa983d4cf91c6ab25f9aa4c353b364f44826e Closes-bug: 1595125
This commit is contained in:
parent
adc02fd625
commit
edde5b9a28
@ -26,7 +26,7 @@
|
||||
Facter.value(:hostname),
|
||||
network,
|
||||
Facter.value(:domain),
|
||||
].reject { |part| part.empty? }
|
||||
].reject { |part| part.nil? || part.empty? }
|
||||
external_hostname_parts.join(".")
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user