Skip to content

Commit

Permalink
unique anchors for postgres_instances
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonHoenscheid committed Jul 3, 2023
1 parent ad3731a commit 0a69a5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifests/server/instance/late_initdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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}"],
}
}
6 changes: 3 additions & 3 deletions manifests/server/instance/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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}": }
}

0 comments on commit 0a69a5f

Please sign in to comment.