feat: manage database/user/grants for patroni
- add defines for exporting/collecting psql objects for patroni - add generic profile for managing patroni psql databases for an app
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
define profiles::sql::postgres::user (
|
||||
String $username,
|
||||
String $password,
|
||||
) {
|
||||
postgresql_psql { "create_user_${username}":
|
||||
command => "CREATE USER \"${username}\" WITH ENCRYPTED PASSWORD '${password}'",
|
||||
unless => "SELECT 1 FROM pg_roles WHERE rolname = '${username}'",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user