From 784a2aa0c8180da9e229df155c4f13c3cdddf962 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Mon, 5 Sep 2016 14:45:47 +0300 Subject: 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 --- lib/facter/alt_fqdns.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib') 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 -- cgit 1.2.3-korg