From 681f2041bbb5194ab6f7fa08599f3485cfc9b32e Mon Sep 17 00:00:00 2001 From: Nathan Garabedian Date: Mon, 8 Oct 2018 15:28:21 -0700 Subject: [PATCH] Add space to the match so that we don't accidentally match network names that are substrings of other existing network names i.e. staging and staging2 --- manifests/network.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/network.pp b/manifests/network.pp index 929189a..a44cd36 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -111,7 +111,7 @@ } exec { "virsh-net-define-${title}": command => "virsh net-define ${network_file}", - unless => "virsh -q net-list --all | grep -Eq '^\s*${title}'", + unless => "virsh -q net-list --all | grep -Eq '^\s*${title}\s'", require => Exec["create-${network_file}"], } if $autostart {