Setting the owner of the database with createdb.

This commit is contained in:
Bruno Harbulot 2013-03-16 16:23:51 +00:00
parent 572f090a1d
commit 33c56e97ef

View file

@ -21,6 +21,7 @@
define postgresql::database(
$dbname = $title,
$owner = $postgresql::params::user,
$tablespace = undef,
$charset = $postgresql::params::charset,
$locale = $postgresql::params::locale
@ -47,7 +48,7 @@ define postgresql::database(
$public_revoke_privilege = 'ALL'
}
$createdb_command_tmp = "${postgresql::params::createdb_path} --template=template0 --encoding '${charset}' ${locale_option} '${dbname}'"
$createdb_command_tmp = "${postgresql::params::createdb_path} --owner='${owner}' --template=template0 --encoding '${charset}' ${locale_option} '${dbname}'"
if($tablespace == undef) {
$createdb_command = $createdb_command_tmp