File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 7
7
# @param psql_user Sets the OS user to run psql.
8
8
# @param port Port to use when connecting.
9
9
# @param connect_settings Specifies a hash of environment variables used when connecting to a remote server.
10
+ # @param with_admin_option Specifies if the role should be granted with admin option.
10
11
define postgresql::server::grant_role (
11
12
String[1] $group ,
12
13
String[1] $role = $name,
15
16
$psql_user = $postgresql::server::user,
16
17
$port = $postgresql::server::port,
17
18
$connect_settings = $postgresql::server::default_connect_settings,
19
+ $with_admin_option = false ,
18
20
) {
19
21
case $ensure {
20
22
' present' : {
21
- $command = " GRANT \" ${group} \" TO \" ${role} \" "
23
+ $with_admin_option_sql = $with_admin_option ? { true => ' WITH ADMIN OPTION' , default => ' ' }
24
+ $command = " GRANT \" ${group} \" TO \" ${role} \" ${with_admin_option_sql} "
22
25
$unless_comp = ' ='
23
26
}
24
27
' absent' : {
You can’t perform that action at this time.
0 commit comments