File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 3535 Boolean $inherit = true ,
3636 Boolean $superuser = false ,
3737 Boolean $replication = false ,
38+ Optional[String[1]] $valid_until = undef ,
3839 String[1] $connection_limit = ' -1' ,
3940 String[1] $username = $title ,
4041 Hash $connect_settings = $postgresql::server::default_connect_settings ,
126127 unless => " SELECT 1 FROM pg_roles WHERE rolname = '${username} ' AND rolinherit = ${inherit} " ,
127128 }
128129
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+
129136 if (versioncmp($version , ' 9.1' ) >= 0) {
130137 if $replication_sql == ' ' {
131138 postgresql_psql { "ALTER ROLE \"${username}\" NOREPLICATION" :
You can’t perform that action at this time.
0 commit comments