diff --git a/nova/core/roles/configure_networking/templates/netplan.yml b/nova/core/roles/configure_networking/templates/netplan.yml index 69fe0295..629d2eb9 100644 --- a/nova/core/roles/configure_networking/templates/netplan.yml +++ b/nova/core/roles/configure_networking/templates/netplan.yml @@ -67,12 +67,12 @@ network: {% if (interface.egress) and (dns_server_combined != []) %} nameservers: addresses: - {% if (dns_servers != []) and (interface.addresses | map(attribute='pool_id') | regex_search(".*ipv4.*")) %} + {% if (dns_servers != []) and (interface.addresses | map(attribute='mode') | regex_search(".*ipv4.*")) %} {% for address in dns_servers %} - {{ address }} {% endfor %} {% endif %} - {% if (dns_servers6 != []) and (interface.addresses | map(attribute='pool_id') | regex_search(".*ipv6.*")) %} + {% if (dns_servers6 != []) and (interface.addresses | map(attribute='mode') | regex_search(".*ipv6.*")) %} {% for address in dns_servers6 %} - "{{ address }}" {% endfor %}