diff --git a/data/deployments/staging/common.yaml b/data/deployments/staging/common.yaml --- a/data/deployments/staging/common.yaml +++ b/data/deployments/staging/common.yaml @@ -106,7 +106,8 @@ swh::postgresql::version: '12' swh::postgresql::port: 5433 swh::postgresql::cluster_name: "%{lookup('swh::postgresql::version')}/main" -swh::postgresql::datadir: "%{lookup('swh::base_directory')}/postgresql/%{lookup('swh::postgresql::cluster_name')}" +swh::postgresql::datadir_base: "%{lookup('swh::base_directory')}/postgres" +swh::postgresql::datadir: "%{lookup('swh::postgresql::datadir_base')}/%{lookup('swh::postgresql::cluster_name')}" swh::postgresql::listen_addresses: - 0.0.0.0 swh::postgresql::network_accesses: diff --git a/site-modules/profile/manifests/postgresql/server.pp b/site-modules/profile/manifests/postgresql/server.pp --- a/site-modules/profile/manifests/postgresql/server.pp +++ b/site-modules/profile/manifests/postgresql/server.pp @@ -12,11 +12,12 @@ } $postgres_version = lookup('swh::postgresql::version') $postgres_port = lookup('swh::postgresql::port') + $postgres_datadir_base = lookup('swh::postgresql::datadir_base') $postgres_datadir = lookup('swh::postgresql::datadir') $ip_mask_allow_all_users = '0.0.0.0/0' - file { [ "${swh_base_directory}/postgresql", - "${swh_base_directory}/postgresql/${postgres_version}" ] : + file { [ "${postgres_datadir_base}", + "${postgres_datadir_base}/${postgres_version}" ] : ensure => directory, owner => 'root', group => 'root',