ensure bond and interfaces only added once

This commit is contained in:
Josh Patterson
2025-06-20 16:24:54 -04:00
parent 19fb081fa0
commit 480e248131

View File

@@ -35,6 +35,7 @@ bond0_interface:
connection.autoconnect yes
nmcli con mod bond0 ethernet.mtu 9000
nmcli con up bond0
- unless: nmcli con show bond0
{% if non_enp1s0_interfaces|length > 0 %}
- require_in:
{% for iface in non_enp1s0_interfaces %}
@@ -55,7 +56,7 @@ bond0_interface:
slave-type bond \
ethernet.mtu 9000
nmcli con up bond0-slave-{{ iface }}
- unless: nmcli con show bond0-slave-{{ iface }}
{% endfor %}
{% endif %}