fix for failing remove of default network
Change-Id: If3003fb2ddfb2e938694a47fc92a819d12422e20
Related: PROD-15555
diff --git a/libvirt/server/network.sls b/libvirt/server/network.sls
index e4a8d4e..2760e39 100644
--- a/libvirt/server/network.sls
+++ b/libvirt/server/network.sls
@@ -51,8 +51,8 @@
net-{{ name }}:
cmd.run:
- - name: virsh net-destroy {{ name }} 2>&1 1>/dev/null; virsh net-undefine {{ name }}
- - onlyif: virsh -q net-list --all | grep -q '^\s*{{ name }}'
+ - name: virsh net-undefine {{ name }};virsh net-destroy {{ name }} 2>&1 1>/dev/null
+ - onlyif: virsh -q net-list --all | grep -Eq '^\s*{{ name }}'
net-autostart-{{ name }}:
cmd.run: