|
99 | 99 | # @param pg_hba_auth_password_encryption |
100 | 100 | # Specify the type of encryption set for the password in pg_hba_conf, |
101 | 101 | # this value is usefull if you want to start enforcing scram-sha-256, but give users transition time. |
| 102 | +# @param databases Specifies a hash from which to generate postgresql::server::database resources. |
102 | 103 | # @param roles Specifies a hash from which to generate postgresql::server::role resources. |
103 | 104 | # @param grants Specifies a hash from which to generate postgresql::server::grant resources. |
104 | 105 | # @param config_entries Specifies a hash from which to generate postgresql::server::config_entry resources. |
|
185 | 186 | Optional[Postgresql::Pg_password_encryption] $pg_hba_auth_password_encryption = undef, |
186 | 187 | Optional[String] $extra_systemd_config = $postgresql::params::extra_systemd_config, |
187 | 188 |
|
| 189 | + Hash[String[1], Hash] $databases = {}, |
188 | 190 | Hash[String, Hash] $roles = {}, |
189 | 191 | Hash[String[1], Hash] $grants = {}, |
190 | 192 | Hash[String, Any] $config_entries = {}, |
|
213 | 215 | -> Class['postgresql::server::service'] |
214 | 216 | -> Class['postgresql::server::passwd'] |
215 | 217 |
|
| 218 | + $databases.each |$databasename, $database| { |
| 219 | + postgresql::server::database { $databasename: |
| 220 | + * => $database, |
| 221 | + } |
| 222 | + } |
| 223 | + |
216 | 224 | $roles.each |$rolename, $role| { |
217 | 225 | postgresql::server::role { $rolename: |
218 | 226 | * => $role, |
|
0 commit comments