bundles/powerdns: add private ipv6 addresses as well
This commit is contained in:
parent
e73dcf16e3
commit
0d0548311c
1 changed files with 4 additions and 1 deletions
|
@ -143,11 +143,14 @@ def generate_dns_entries_for_nodes(metadata):
|
|||
if not ip6 and not ip.is_private:
|
||||
ip6 = ip
|
||||
|
||||
if not (ip4 or ip6) and found_ips['ipv4']:
|
||||
if not (ip4 or ip6) and (found_ips['ipv4'] or found_ips['ipv6']):
|
||||
# do it again, but do not filter out private addresses
|
||||
for ip in sorted(found_ips['ipv4']):
|
||||
if not ip4:
|
||||
ip4 = ip
|
||||
for ip in sorted(found_ips['ipv6']):
|
||||
if not ip6:
|
||||
ip6 = ip
|
||||
|
||||
if ip4:
|
||||
results.add('{} IN A {}'.format(dns_name, ip4))
|
||||
|
|
Loading…
Reference in a new issue