diff --git a/roles/network/templates/nmconnection.j2 b/roles/network/templates/nmconnection.j2 index 3e7797d..2dc1ef9 100644 --- a/roles/network/templates/nmconnection.j2 +++ b/roles/network/templates/nmconnection.j2 @@ -24,7 +24,7 @@ gateway={{ item.gateway }} {% elif item.proto == 'none' %} method=disabled {% endif %} -{% if item.nameservers is defined %} +{% if item.nameservers is defined and item.nameservers != [] %} dns={% for name in item.nameservers %}{{ name }};{% endfor %} {% endif %}