Skip to content

Commit 6e55b9b

Browse files
committed
Ensure db user exists before validating db connection
The validate_db_connection class takes a user to connect as, but if we're using the progresql::server::db defined type then the user might not be created yet, and might not have any permissions granted yet. This patch users a collector to ensure that the that the user and grants are active before validating.
1 parent 7ad1390 commit 6e55b9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

manifests/server/db.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
privilege => $grant,
3636
db => $dbname,
3737
role => $user,
38-
}
38+
} -> Postgresql::Validate_db_connection<| database_name == $dbname |>
3939
}
4040

4141
if($tablespace != undef and defined(Postgresql::Server::Tablespace[$tablespace])) {

0 commit comments

Comments
 (0)