aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postgresql/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/postgresql/manifests/init.pp')
-rw-r--r--modules/postgresql/manifests/init.pp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/postgresql/manifests/init.pp b/modules/postgresql/manifests/init.pp
index 9a1e9172..50aa8fde 100644
--- a/modules/postgresql/manifests/init.pp
+++ b/modules/postgresql/manifests/init.pp
@@ -91,10 +91,11 @@ class postgresql {
}
define user($password) {
- $sql = "CREATE ROLE $name ENCRYPTED PASSWORD '$password' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;"
+ $sql = "CREATE ROLE $name ENCRYPTED PASSWORD '\$pass' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;"
exec { "psql -U postgres -c \"$sql\" ":
user => root,
+ environment => "pass=$password",
unless => "psql -A -t -U postgres -c '\du $name' | grep '$name'",
}
}