Bridge and VLAN support for ifupdown2 #99

Merged
jeltz merged 5 commits from ifupdown2 into master 2022-08-27 10:26:32 +02:00
Showing only changes of commit f6b12fd696 - Show all commits

View file

@ -3,11 +3,27 @@
{% for name, iface in ifupdown2__interfaces.items() %} {% for name, iface in ifupdown2__interfaces.items() %}
auto {{ name }} auto {{ name }}
iface {{ name }} iface {{ name }}
{% for address in iface.addresses %} {% for address in iface.addresses | default([]) %}
address {{ address | ipaddr }} address {{ address | ipaddr }}
{% endfor %} {% endfor %}
{% for gateway in iface.gateways | default([]) %} {% for gateway in iface.gateways | default([]) %}
gateway {{ gateway | ipaddr }} gateway {{ gateway | ipaddr }}
{% endfor %} {% endfor %}
{% if iface.bridge_ports is defined %}
bridge-ports {{ iface.bridge_ports | join(" ") }}
{% endif %}
{% if iface.bridge_vlan_aware is defined %}
bridge-vlan-aware {{ iface.bridge_vlan_aware
| ternary("yes", "no") }}
{% endif %}
{% if iface.bridge_vids is defined %}
bridge-vids {{ iface.bridge_vids | join(",") }}
{% endif %}
{% if iface.vlan_id is defined %}
vlan-id {{ iface.vlan_id | int }}
{% endif %}
{% if iface.vlan_raw_device is defined %}
vlan-raw-device {{ iface.vlan_raw_device }}
{% endif %}
{% endfor %} {% endfor %}