aboutsummaryrefslogtreecommitdiffstats
path: root/modules/postgresql/manifests
diff options
context:
space:
mode:
authorMichael Scherer <misc@mageia.org>2010-12-17 01:45:21 +0000
committerMichael Scherer <misc@mageia.org>2010-12-17 01:45:21 +0000
commitdc954f622c04e9a604b0d300bb69f586fbc3fd80 (patch)
tree867814651f533259a93835796bb1b61826ed9bbe /modules/postgresql/manifests
parent1af72dd321f4e61b3a6f4cfbe44bbe732ddcc9b4 (diff)
downloadpuppet-dc954f622c04e9a604b0d300bb69f586fbc3fd80.tar
puppet-dc954f622c04e9a604b0d300bb69f586fbc3fd80.tar.gz
puppet-dc954f622c04e9a604b0d300bb69f586fbc3fd80.tar.bz2
puppet-dc954f622c04e9a604b0d300bb69f586fbc3fd80.tar.xz
puppet-dc954f622c04e9a604b0d300bb69f586fbc3fd80.zip
- do not include password on command line, but use a environnement
variable, so we avoid password leak on the mailling list
Diffstat (limited to 'modules/postgresql/manifests')
-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'",
}
}