Skip to content

Commit dcac94a

Browse files
committed
Merge pull request #156 from harbulot/issue_114
Setting the owner of the database with createdb.
2 parents 5bc584e + 33c56e9 commit dcac94a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

manifests/database.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
define postgresql::database(
2323
$dbname = $title,
24+
$owner = $postgresql::params::user,
2425
$tablespace = undef,
2526
$charset = $postgresql::params::charset,
2627
$locale = $postgresql::params::locale
@@ -47,7 +48,7 @@
4748
$public_revoke_privilege = 'ALL'
4849
}
4950

50-
$createdb_command_tmp = "${postgresql::params::createdb_path} --template=template0 --encoding '${charset}' ${locale_option} '${dbname}'"
51+
$createdb_command_tmp = "${postgresql::params::createdb_path} --owner='${owner}' --template=template0 --encoding '${charset}' ${locale_option} '${dbname}'"
5152

5253
if($tablespace == undef) {
5354
$createdb_command = $createdb_command_tmp

0 commit comments

Comments
 (0)