diff options
author | Thomas Backlund <tmb@mageia.org> | 2015-10-20 11:13:37 +0300 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2015-10-20 11:13:37 +0300 |
commit | 1428ce45c5c1c0a880a08dfc692463a3538afaf8 (patch) | |
tree | a4186373e1165aba69c4e7bd5021b325efcd2125 /modules/postgresql/manifests/user.pp | |
parent | 50cfe0d1d1a1ce2ec1900a9ba016e9d7f72a7025 (diff) | |
download | puppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.tar puppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.tar.gz puppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.tar.bz2 puppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.tar.xz puppet-1428ce45c5c1c0a880a08dfc692463a3538afaf8.zip |
lint fixes for postgresql
Diffstat (limited to 'modules/postgresql/manifests/user.pp')
-rw-r--r-- | modules/postgresql/manifests/user.pp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/postgresql/manifests/user.pp b/modules/postgresql/manifests/user.pp index b70dd122..5b73b243 100644 --- a/modules/postgresql/manifests/user.pp +++ b/modules/postgresql/manifests/user.pp @@ -1,13 +1,13 @@ # TODO convert to a regular type, so we can later change password # without erasing the current user define postgresql::user($password) { - $sql = "CREATE ROLE $name ENCRYPTED PASSWORD '\$pass' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;" + $sql = "CREATE ROLE ${name} ENCRYPTED PASSWORD '\${pass}' NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;" - exec { "psql -U postgres -c \"$sql\" ": + exec { "psql -U postgres -c \"${sql}\" ": user => 'root', # do not leak the password on commandline - environment => "pass=$password", - unless => "psql -A -t -U postgres -c '\\du $name' | grep '$name'", + environment => "pass=${password}", + unless => "psql -A -t -U postgres -c '\\du ${name}' | grep '${name}'", require => Service['postgresql'], } } |