Defined Type: confdroid_postgresql::server::roles::role_df

Defined in:
manifests/server/roles/role_df.pp

Summary

define manages databases

Overview

Parameters:

  • pl_role_name (Optional[String]) (defaults to: undef)

    the name of the role to be created.

  • pl_role_pw (Optional[String]) (defaults to: undef)

    the password to be created

  • pl_role_attributes (String) (defaults to: 'LOGIN')

    attributes for the role to be created

  • pl_role_status (String) (defaults to: 'CREATE ROLE')

    what to do with the role

See Also:



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'manifests/server/roles/role_df.pp', line 12

define confdroid_postgresql::server::roles::role_df (

  Optional[String] $pl_role_name      = undef,
  Optional[String] $pl_role_pw        = undef,
  String $pl_role_attributes          = 'LOGIN',
  String $pl_role_status              = 'CREATE ROLE',

) {
  $pl_manage_content  = $confdroid_postgresql::params::pl_manage_content

  if $pl_manage_content == true {
    # create the role

    exec { "role_${name}":
      command => template('confdroid_postgresql/server/roles/role.sql.erb'),
      user    => 'postgres',
      path    => ['/usr/bin','/bin'],
      cwd     => '/tmp',
      unless  => template('confdroid_postgresql/server/roles/unless_sql.erb'),
    }
  }
}