summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2014-03-14 11:25:55 -0400
committerJames Shubin <james@shubin.ca>2014-03-16 22:39:08 -0400
commit8139b898583ddd6f1a71df235719faec8305d161 (patch)
tree267dfd9b9d31a9e69875ae14ead247f49e2e4027
parent2cea9a9febf6926fc001eea9162232d432354736 (diff)
downloadpuppet-gluster-rhs.tar.gz
puppet-gluster-rhs.tar.xz
puppet-gluster-rhs.zip
Improved UUID validation logic for manual UUID selection.rhs
Fixed the logic that was backwards when you chose a UUID manually.
-rw-r--r--manifests/host.pp2
1 files changed, 1 insertions, 1 deletions
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.")
}