fix(dns): dont set host ip if a target has only one type of IP

Previously, the role would set the host IP if a target
would only define an IPv4 address (f.ex.) and set the
IPv6 address to the host IP, which can be wrong.
This commit is contained in:
transcaffeine 2021-02-08 11:42:44 +01:00
parent 750a95b8f1
commit faf1f0bd90
No known key found for this signature in database
GPG key ID: 03624C433676E465

View file

@ -25,7 +25,7 @@
and ((
item[1].target is defined
and item[1].target.ipv4 is defined)
or dns_host_ipv4 is defined)
or (dns_host_ipv4 is defined and item[1].target is undefined))
and (item[1].only is undefined or item[1].only == item[0])
- name: Set AAAA records
@ -41,7 +41,7 @@
and ((
item[1].target is defined
and item[1].target.ipv6 is defined)
or dns_host_ipv6 is defined)
or (dns_host_ipv6 is defined and item[1].target is undefined ))
and (item[1].only is undefined or item[1].only == item[0])
- name: Set CNAME records