diff options
author | Juan Antonio Osorio Robles <jaosorior@redhat.com> | 2016-09-05 14:45:47 +0300 |
---|---|---|
committer | Juan Antonio Osorio Robles <jaosorior@redhat.com> | 2016-09-05 14:45:47 +0300 |
commit | 784a2aa0c8180da9e229df155c4f13c3cdddf962 (patch) | |
tree | 03c6f1118147cc526c6e74242d6aa46c8a10aea9 | |
parent | fdfd8ab4f729d471b3c5abdd5562a6ceb17089f3 (diff) |
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
-rw-r--r-- | lib/facter/alt_fqdns.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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 |