From 8139b898583ddd6f1a71df235719faec8305d161 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Fri, 14 Mar 2014 11:25:55 -0400 Subject: Improved UUID validation logic for manual UUID selection. Fixed the logic that was backwards when you chose a UUID manually. --- manifests/host.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/host.pp b/manifests/host.pp index 6ed4262..4e39790 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -29,7 +29,7 @@ define gluster::host( #$vardir = $::gluster::vardir::module_vardir # with trailing slash $vardir = regsubst($::gluster::vardir::module_vardir, '\/$', '') - if ("${uuid}" != '') and "${uuid}" =~ /^[a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12}$/ { + if ("${uuid}" != '') and (! ("${uuid}" =~ /^[a-f0-9]{8}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{4}\-[a-f0-9]{12}$/)) { fail("The chosen UUID: '${uuid}' is not valid.") } -- cgit