bundles/powerdns: make sure every dns server is able to resolve every other dns server

This commit is contained in:
Franzi 2020-10-25 10:58:11 +01:00
parent a33d8e4201
commit b70f9c9c9d
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -102,3 +102,19 @@ def generate_dns_entries_for_nodes(metadata):
},
},
}
@metadata_reactor
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)
}
return {
'hosts': {
'entries': entries,
},
}