Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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 = {},

Expand Down Expand Up @@ -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'),
Expand Down