diff --git a/manifests/server/extension.pp b/manifests/server/extension.pp index 1093011..2170ce5 100644 --- a/manifests/server/extension.pp +++ b/manifests/server/extension.pp @@ -5,6 +5,19 @@ define postgresql::server::extension ( $package_name = undef, $package_ensure = undef, ) { + $user = $postgresql::server::user + $group = $postgresql::server::group + $psql_path = $postgresql::server::psql_path + $port = $postgresql::server::port + + # Set the defaults for the postgresql_psql resource + Postgresql_psql { + psql_user => $user, + psql_group => $group, + psql_path => $psql_path, + port => $port, + } + case $ensure { 'present': { $command = "CREATE EXTENSION ${name}" diff --git a/manifests/server/initdb.pp b/manifests/server/initdb.pp index abee5c8..9dd28ba 100644 --- a/manifests/server/initdb.pp +++ b/manifests/server/initdb.pp @@ -9,6 +9,16 @@ class postgresql::server::initdb { $locale = $postgresql::server::locale $group = $postgresql::server::group $user = $postgresql::server::user + $psql_path = $postgresql::server::psql_path + $port = $postgresql::server::port + + # Set the defaults for the postgresql_psql resource + Postgresql_psql { + psql_user => $user, + psql_group => $group, + psql_path => $psql_path, + port => $port, + } # Make sure the data directory exists, and has the correct permissions. file { $datadir: