2023-09-01 15:42:21 -04:00
|
|
|
# PVC node interface-specific interface file - {{ network.key }}
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
|
|
|
|
auto {{ network.value['device'] }}
|
2023-09-01 15:42:30 -04:00
|
|
|
iface {{ network.value['device'] }} inet {{ network.value['mode']|default('manual') }}
|
2024-09-27 23:46:38 -04:00
|
|
|
{% if network.value['custom_options'] is defined %}
|
|
|
|
{% for option in network.value['custom_options'] %}
|
|
|
|
{{ option['timing'] }}-up {{ option['command'] }}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
{% if network.value['mtu'] is defined %}
|
2023-09-01 15:42:21 -04:00
|
|
|
post-up ip link set $IFACE mtu {{ network.value['mtu'] }}
|
2024-09-27 23:46:38 -04:00
|
|
|
{% endif %}
|
2023-09-01 15:42:21 -04:00
|
|
|
{% if network.value['type'] == 'bond' %}
|
2023-09-01 15:42:27 -04:00
|
|
|
bond-mode {{ network.value['bond_mode'] }}
|
|
|
|
bond-slaves {{ network.value['bond_devices'] | join(' ') }}
|
2023-09-01 15:42:21 -04:00
|
|
|
{% endif %}
|
|
|
|
{% if network.value['type'] == 'vlan' %}
|
|
|
|
vlan_raw_device {{ network.value['raw_device'] }}
|
|
|
|
{% endif %}
|