Code Review
/
apex-puppet-tripleo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
adc02fd
)
Fix retrieval of hostname fact based on network.
author
Sofer Athlan-Guyot
<sathlang@redhat.com>
Wed, 22 Jun 2016 10:23:10 +0000
(12:23 +0200)
committer
Athlan-Guyot sofer
<sathlang@redhat.com>
Mon, 11 Jul 2016 09:25:37 +0000
(09:25 +0000)
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
lib/facter/alt_fqdns.rb
patch
|
blob
|
history
diff --git
a/lib/facter/alt_fqdns.rb
b/lib/facter/alt_fqdns.rb
index
24d6ef1
..
8a4d59b
100644
(file)
--- a/
lib/facter/alt_fqdns.rb
+++ b/
lib/facter/alt_fqdns.rb
@@
-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