From 480e248131c8512cdfcd2e84649497b8e4e7ed19 Mon Sep 17 00:00:00 2001 From: Josh Patterson Date: Fri, 20 Jun 2025 16:24:54 -0400 Subject: [PATCH] ensure bond and interfaces only added once --- salt/sensor/vm/network.sls | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/sensor/vm/network.sls b/salt/sensor/vm/network.sls index 9e25bca65..3e388adf6 100644 --- a/salt/sensor/vm/network.sls +++ b/salt/sensor/vm/network.sls @@ -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 %}