- add defines for exporting/collecting psql objects for patroni - add generic profile for managing patroni psql databases for an app
10 lines
291 B
Puppet
10 lines
291 B
Puppet
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}'",
|
|
}
|
|
}
|