Skip adding interfaces to DNS that don't have an associated IP address

This commit is contained in:
Salt 2022-05-10 05:52:11 -05:00
parent 128b3bd982
commit 1792066f49

View File

@ -44,6 +44,7 @@
value:
- "{{ item.ip_addresses[0].address | regex_replace('/.*', '') }}"
with_items: "{{ interfaces }}"
when: item.ip_addresses[0].address is defined
loop_control:
label: "{{ item.display }}"
tags: [ route53, dns, interface ]