2013-08-27 22:43:47 +02:00
|
|
|
# Manage a database grant. See README.md for more details.
|
|
|
|
define postgresql::server::database_grant(
|
2013-07-16 21:30:39 +02:00
|
|
|
$privilege,
|
|
|
|
$db,
|
|
|
|
$role,
|
|
|
|
$psql_db = undef,
|
|
|
|
$psql_user = undef
|
|
|
|
) {
|
2013-08-27 22:43:47 +02:00
|
|
|
postgresql::server::grant { "database:${name}":
|
2013-07-16 21:30:39 +02:00
|
|
|
role => $role,
|
|
|
|
db => $db,
|
|
|
|
privilege => $privilege,
|
2013-08-27 22:43:47 +02:00
|
|
|
object_type => 'DATABASE',
|
|
|
|
object_name => $db,
|
2013-07-16 21:30:39 +02:00
|
|
|
psql_db => $psql_db,
|
|
|
|
psql_user => $psql_user,
|
|
|
|
}
|
|
|
|
}
|