diff --git a/manifests/server.pp b/manifests/server.pp index 24ff268770..974f5e0bb4 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -100,6 +100,7 @@ # Specify the type of encryption set for the password in pg_hba_conf, # this value is usefull if you want to start enforcing scram-sha-256, but give users transition time. # @param roles Specifies a hash from which to generate postgresql::server::role resources. +# @param grants Specifies a hash from which to generate postgresql::server::grant resources. # @param config_entries Specifies a hash from which to generate postgresql::server::config_entry resources. # @param pg_hba_rules Specifies a hash from which to generate postgresql::server::pg_hba_rule resources. # @@ -185,6 +186,7 @@ Optional[String] $extra_systemd_config = $postgresql::params::extra_systemd_config, Hash[String, Hash] $roles = {}, + Hash[String[1], Hash] $grants = {}, Hash[String, Any] $config_entries = {}, Postgresql::Pg_hba_rules $pg_hba_rules = {}, @@ -217,6 +219,13 @@ } } + $grants.each |$grantname, $grant| { + postgresql::server::grant { $grantname: + * => $grant, + } + } + + $config_entries.each |$entry, $value| { postgresql::server::config_entry { $entry: ensure => bool2str($value =~ Undef, 'absent', 'present'),