manage brdige without interfaces

This commit is contained in:
histausse 2021-07-11 03:26:20 +02:00
parent d786b25c5b
commit cd516e3e18
Signed by: histausse
GPG key ID: 67486F107F62E9E9
2 changed files with 4 additions and 0 deletions

View file

@ -28,6 +28,8 @@ iface {{ item.key }} inet manual
{% if 'bridge' in item.value and item.value.bridge %} {% if 'bridge' in item.value and item.value.bridge %}
{% if 'interfaces' in item.value and item.value.interfaces %} {% if 'interfaces' in item.value and item.value.interfaces %}
bridge-ports {{ item.value.interfaces | join(' ') }} bridge-ports {{ item.value.interfaces | join(' ') }}
{% else %}
bridge-ports none
{% endif %} {% endif %}
bridge-stp off bridge-stp off
bridge-fd 0 bridge-fd 0

View file

@ -41,6 +41,8 @@ network:
{{ item.key }}: {{ item.key }}:
{% if 'interfaces' in item.value and item.value.interfaces %} {% if 'interfaces' in item.value and item.value.interfaces %}
interfaces: [ {{ item.value.interfaces | join(', ') }} ] interfaces: [ {{ item.value.interfaces | join(', ') }} ]
{% else %}
interfaces: []
{% endif %} {% endif %}
{% if item.value.type == 'dhcp' %} {% if item.value.type == 'dhcp' %}
dhcp4: true dhcp4: true