2022-08-26 20:52:23 +02:00
|
|
|
{{ ansible_managed | comment }}
|
|
|
|
|
|
|
|
{% for name, iface in ifupdown2__interfaces.items() %}
|
2022-08-27 04:46:16 +02:00
|
|
|
auto {{ name }}
|
2022-08-26 20:52:23 +02:00
|
|
|
iface {{ name }}
|
2022-08-27 08:31:42 +02:00
|
|
|
{% for address in iface.addresses | default([]) %}
|
2022-08-26 20:52:23 +02:00
|
|
|
address {{ address | ipaddr }}
|
|
|
|
{% endfor %}
|
2022-08-27 04:10:11 +02:00
|
|
|
{% for gateway in iface.gateways | default([]) %}
|
2022-08-26 20:52:23 +02:00
|
|
|
gateway {{ gateway | ipaddr }}
|
|
|
|
{% endfor %}
|
2022-08-27 08:31:42 +02:00
|
|
|
{% 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 %}
|
2022-08-27 04:10:11 +02:00
|
|
|
|
2022-08-26 20:52:23 +02:00
|
|
|
{% endfor %}
|