parent
af4dbadd36
commit
a9bb42029c
|
@ -25,7 +25,7 @@ define pgsql::database::create ($username, $password) {
|
||||||
unless => "psql -tAc \"SELECT 1 FROM pg_roles WHERE rolname='${username}'\" | grep -q 1",
|
unless => "psql -tAc \"SELECT 1 FROM pg_roles WHERE rolname='${username}'\" | grep -q 1",
|
||||||
command => "psql -c \"CREATE ROLE ${username} WITH LOGIN PASSWORD '${password}';\" && \
|
command => "psql -c \"CREATE ROLE ${username} WITH LOGIN PASSWORD '${password}';\" && \
|
||||||
createdb -O ${username} -E UTF8 -T template0 ${name} && \
|
createdb -O ${username} -E UTF8 -T template0 ${name} && \
|
||||||
createlang plpgsql ${name}",
|
(createlang plpgsql ${name} || true)",
|
||||||
user => 'postgres',
|
user => 'postgres',
|
||||||
require => Class['pgsql']
|
require => Class['pgsql']
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue