From: Juan Antonio Osorio Robles Date: Mon, 5 Sep 2016 11:45:47 +0000 (+0300) Subject: Map ctlplane network to management fqdn X-Git-Tag: opnfv-6.0.0~595^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=784a2aa0c8180da9e229df155c4f13c3cdddf962;p=apex-puppet-tripleo.git Map ctlplane network to management fqdn We don't really expose a management network, but a ctlplane one. So when someone requests the ctlplane fqdn, we'll give the management one. Since that's what we actually fill in the hosts. Change-Id: Iede5a06d73206f98f283729f1879484f09d4012a --- diff --git a/lib/facter/alt_fqdns.rb b/lib/facter/alt_fqdns.rb index 89c4b6a..216beef 100644 --- a/lib/facter/alt_fqdns.rb +++ b/lib/facter/alt_fqdns.rb @@ -31,3 +31,14 @@ 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