Skip to content

Commit 121a455

Browse files
authored
Merge pull request #1668 from ikonia/grantscreation
grant creation via hiera through server::grant.pp
2 parents f7284e8 + dae58a4 commit 121a455

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

manifests/server.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
# Specify the type of encryption set for the password in pg_hba_conf,
101101
# this value is usefull if you want to start enforcing scram-sha-256, but give users transition time.
102102
# @param roles Specifies a hash from which to generate postgresql::server::role resources.
103+
# @param grants Specifies a hash from which to generate postgresql::server::grant resources.
103104
# @param config_entries Specifies a hash from which to generate postgresql::server::config_entry resources.
104105
# @param pg_hba_rules Specifies a hash from which to generate postgresql::server::pg_hba_rule resources.
105106
#
@@ -185,6 +186,7 @@
185186
Optional[String] $extra_systemd_config = $postgresql::params::extra_systemd_config,
186187

187188
Hash[String, Hash] $roles = {},
189+
Hash[String[1], Hash] $grants = {},
188190
Hash[String, Any] $config_entries = {},
189191
Postgresql::Pg_hba_rules $pg_hba_rules = {},
190192

@@ -217,6 +219,12 @@
217219
}
218220
}
219221

222+
$grants.each |$grantname, $grant| {
223+
postgresql::server::grant { $grantname:
224+
* => $grant,
225+
}
226+
}
227+
220228
$config_entries.each |$entry, $value| {
221229
postgresql::server::config_entry { $entry:
222230
ensure => bool2str($value =~ Undef, 'absent', 'present'),

0 commit comments

Comments
 (0)