15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'manifests/server/table_grant.pp', line 15
define postgresql::server::table_grant (
Enum['ALL', 'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER', 'all', 'select', 'insert', 'update', 'delete',
'truncate', 'references', 'trigger'] $privilege,
String[1] $table,
String[1] $db,
String[1] $role,
Optional[Enum['present', 'absent']] $ensure = undef,
Optional[Variant[String[1], Stdlib::Port]] $port = undef,
Optional[String[1]] $psql_db = undef,
Optional[String[1]] $psql_user = undef,
Optional[Hash] $connect_settings = undef,
Boolean $onlyif_exists = false,
) {
if $port =~ String {
deprecation('postgres_port', 'Passing a string to the port parameter is deprecated. Stdlib::Port will be the enforced datatype in the next major release')
}
postgresql::server::grant { "table:${name}":
ensure => $ensure,
role => $role,
db => $db,
port => $port,
privilege => $privilege,
object_type => 'TABLE',
object_name => $table,
psql_db => $psql_db,
psql_user => $psql_user,
onlyif_exists => $onlyif_exists,
connect_settings => $connect_settings,
}
}
|