diff options
Diffstat (limited to 'lib/facter/alt_fqdns.rb')
-rw-r--r-- | lib/facter/alt_fqdns.rb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/facter/alt_fqdns.rb b/lib/facter/alt_fqdns.rb index 8a4d59b..216beef 100644 --- a/lib/facter/alt_fqdns.rb +++ b/lib/facter/alt_fqdns.rb @@ -14,9 +14,9 @@ # under the License. [ 'external', - 'internalapi', + 'internal_api', 'storage', - 'storagemgmt', + 'storage_mgmt', 'tenant', 'management', ].each do |network| @@ -24,10 +24,21 @@ setcode do external_hostname_parts = [ Facter.value(:hostname), - network, + network.gsub('_', ''), Facter.value(:domain), ].reject { |part| part.nil? || part.empty? } external_hostname_parts.join(".") end end end +# map ctlplane network to management fqdn +Facter.add('fqdn_ctlplane') do + setcode do + hostname_parts = [ + Facter.value(:hostname), + 'management', + Facter.value(:domain), + ].reject { |part| part.nil? || part.empty? } + hostname_parts.join(".") + end +end |