Added puppetlabs-firewall (required by puppetlabs-postgresql), updated the other modules.
This commit is contained in:
parent
5f4b7a3b72
commit
dee66abcdd
137 changed files with 11118 additions and 419 deletions
|
@ -3,8 +3,10 @@ define postgresql::server::role(
|
|||
$password_hash = false,
|
||||
$createdb = false,
|
||||
$createrole = false,
|
||||
$db = $postgresql::server::user,
|
||||
$db = $postgresql::server::default_database,
|
||||
$port = $postgresql::server::port,
|
||||
$login = true,
|
||||
$inherit = true,
|
||||
$superuser = false,
|
||||
$replication = false,
|
||||
$connection_limit = '-1',
|
||||
|
@ -16,6 +18,7 @@ define postgresql::server::role(
|
|||
$version = $postgresql::server::version
|
||||
|
||||
$login_sql = $login ? { true => 'LOGIN', default => 'NOLOGIN' }
|
||||
$inherit_sql = $inherit ? { true => 'INHERIT', default => 'NOINHERIT' }
|
||||
$createrole_sql = $createrole ? { true => 'CREATEROLE', default => 'NOCREATEROLE' }
|
||||
$createdb_sql = $createdb ? { true => 'CREATEDB', default => 'NOCREATEDB' }
|
||||
$superuser_sql = $superuser ? { true => 'SUPERUSER', default => 'NOSUPERUSER' }
|
||||
|
@ -28,6 +31,7 @@ define postgresql::server::role(
|
|||
|
||||
Postgresql_psql {
|
||||
db => $db,
|
||||
port => $port,
|
||||
psql_user => $psql_user,
|
||||
psql_group => $psql_group,
|
||||
psql_path => $psql_path,
|
||||
|
@ -55,6 +59,10 @@ define postgresql::server::role(
|
|||
unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolcanlogin=${login}",
|
||||
}
|
||||
|
||||
postgresql_psql {"ALTER ROLE \"${username}\" ${inherit_sql}":
|
||||
unless => "SELECT rolname FROM pg_roles WHERE rolname='${username}' and rolinherit=${inherit}",
|
||||
}
|
||||
|
||||
if(versioncmp($version, '9.1') >= 0) {
|
||||
if $replication_sql == '' {
|
||||
postgresql_psql {"ALTER ROLE \"${username}\" NOREPLICATION":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue