{% for item in ifupdown2 %}
auto {{ item.iface }}
iface {{ item.iface }}{% if item.method is defined %} inet {{ item.method }}
{% endif %}

{% if item.address is defined %}
    address {{ item.address }}
{% endif %}
{% if item['vlan-raw-device'] is defined %}
    vlan-raw-device {{ item['vlan-raw-device'] }}
{% endif %}
{% if item.routing is defined %}
{% for route in item.routing %}
    {{ route }}
{% endfor %}
{% endif %}
{% if not loop.last %}

{% endif %}
{% endfor %}
