|
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 config_entries Specifies a hash from which to generate postgresql::server::config_entry resources. |
104 | 105 | # @param pg_hba_rules Specifies a hash from which to generate postgresql::server::pg_hba_rule resources. |
|
184 | 185 | Optional[Postgresql::Pg_password_encryption] $pg_hba_auth_password_encryption = undef, |
185 | 186 | Optional[String] $extra_systemd_config = $postgresql::params::extra_systemd_config, |
186 | 187 |
|
| 188 | + Hash[String, Hash] $databases = {}, |
187 | 189 | Hash[String, Hash] $roles = {}, |
188 | 190 | Hash[String, Any] $config_entries = {}, |
189 | 191 | Postgresql::Pg_hba_rules $pg_hba_rules = {}, |
|
211 | 213 | -> Class['postgresql::server::service'] |
212 | 214 | -> Class['postgresql::server::passwd'] |
213 | 215 |
|
| 216 | + $databases.each |$databasename, $database| { |
| 217 | + postgresql::server::database { $databasename: |
| 218 | + * => $database, |
| 219 | + } |
| 220 | + } |
| 221 | + |
214 | 222 | $roles.each |$rolename, $role| { |
215 | 223 | postgresql::server::role { $rolename: |
216 | 224 | * => $role, |
|
0 commit comments