From 0a69a5f5574b4ce5a4afc9353cdfb71647a88719 Mon Sep 17 00:00:00 2001 From: Simon Hoenscheid Date: Mon, 3 Jul 2023 15:32:21 +0200 Subject: [PATCH] unique anchors for postgres_instances --- manifests/server/instance/late_initdb.pp | 2 +- manifests/server/instance/service.pp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/server/instance/late_initdb.pp b/manifests/server/instance/late_initdb.pp index 61c3f38520..71652fe293 100644 --- a/manifests/server/instance/late_initdb.pp +++ b/manifests/server/instance/late_initdb.pp @@ -38,6 +38,6 @@ WHERE datname = 'template1'", unless => "SELECT datname FROM pg_database WHERE datname = 'template1' AND encoding = pg_char_to_encoding('${encoding}')", - before => Anchor['postgresql::server::service::end'], + before => Anchor["postgresql::server::service::end::${name}"], } } diff --git a/manifests/server/instance/service.pp b/manifests/server/instance/service.pp index 2f19d2e392..27cff330e0 100644 --- a/manifests/server/instance/service.pp +++ b/manifests/server/instance/service.pp @@ -25,7 +25,7 @@ Variant[String[1], Stdlib::Absolutepath] $psql_path = $postgresql::server::psql_path, Hash $connect_settings = $postgresql::server::default_connect_settings, ) { - anchor { 'postgresql::server::service::begin': } + anchor { "postgresql::server::service::begin::${name}": } if $service_manage { service { 'postgresqld': @@ -52,11 +52,11 @@ tries => 60, psql_path => $psql_path, require => Service['postgresqld'], - before => Anchor['postgresql::server::service::end'], + before => Anchor["postgresql::server::service::end::${name}"], } Postgresql::Server::Database <| title == $default_database |> -> Postgresql_conn_validator['validate_service_is_running'] } } - anchor { 'postgresql::server::service::end': } + anchor { "postgresql::server::service::end::${name}": } }