File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 35
35
Boolean $inherit = true ,
36
36
Boolean $superuser = false ,
37
37
Boolean $replication = false ,
38
+ Optional[String[1]] $valid_until = undef ,
38
39
String[1] $connection_limit = ' -1' ,
39
40
String[1] $username = $title ,
40
41
Hash $connect_settings = $postgresql::server::default_connect_settings ,
126
127
unless => " SELECT 1 FROM pg_roles WHERE rolname = '${username} ' AND rolinherit = ${inherit} " ,
127
128
}
128
129
130
+ if $valid_until {
131
+ postgresql_psql { "ALTER ROLE \"${username}\" VALID UNTIL '${valid_until}'" :
132
+ unless => " SELECT 1 FROM pg_roles WHERE rolname = '${username} ' AND rolvaliduntil = '${valid_until} '" ,
133
+ }
134
+ }
135
+
129
136
if (versioncmp($version , ' 9.1' ) >= 0) {
130
137
if $replication_sql == ' ' {
131
138
postgresql_psql { "ALTER ROLE \"${username}\" NOREPLICATION" :
You can’t perform that action at this time.
0 commit comments