check if additionalinterfaces is empty

This commit is contained in:
Torma Kristóf 2022-04-16 19:32:19 +02:00
parent eddd055380
commit c1961307c9

View File

@ -11,6 +11,7 @@ network:
{% if netplan.default_gateway is defined and netplan.default_gateway|length > 0 %} {% if netplan.default_gateway is defined and netplan.default_gateway|length > 0 %}
gateway4: {{netplan.default_gateway}} gateway4: {{netplan.default_gateway}}
{% endif %} {% endif %}
{% if netplan.additionalinterfaces is defined and netplan.additionalinterfaces|length > 0 %}
{% for interface in netplan.additionalinterfaces %} {% for interface in netplan.additionalinterfaces %}
{{ interface.name }}: {{ interface.name }}:
dhcp4: {{ interface.dhcp4 }} dhcp4: {{ interface.dhcp4 }}
@ -36,3 +37,4 @@ network:
search: [] search: []
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %}