introduce node.metadata['hostname'] to other bundles, update nodefiles to reflect changes
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
de73552700
commit
831545d8b1
11 changed files with 24 additions and 18 deletions
|
@ -109,9 +109,19 @@ def hosts_entries_for_all_dns_servers(metadata):
|
|||
entries = {}
|
||||
|
||||
for rnode in repo.nodes_in_group('dns'):
|
||||
entries[rnode.metadata.get('external_ipv4')] = {
|
||||
rnode.metadata.get('powerdns/my_hostname', node.hostname)
|
||||
}
|
||||
if rnode.name == node.name:
|
||||
continue
|
||||
|
||||
ip = rnode.metadata.get('external_ipv4')
|
||||
|
||||
if ip:
|
||||
entries[ip] = {
|
||||
rnode.metadata.get('hostname'),
|
||||
rnode.name,
|
||||
}
|
||||
|
||||
if rnode.metadata.get('powerdns/my_hostname', None):
|
||||
entries[ip].add(rnode.metadata.get('powerdns/my_hostname'))
|
||||
|
||||
return {
|
||||
'hosts': {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue