Defined Type: openstack::db::project_grants

Defined in:
modules/openstack/manifests/db/project_grants.pp

Overview

Parameters:

  • db_user (Any)
  • db_pass (Any)
  • db_name (Any)
  • access_hosts (Any)
  • privs (Any) (defaults to: 'ALL PRIVILEGES')
  • project_name (Any) (defaults to: undef)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'modules/openstack/manifests/db/project_grants.pp', line 1

define openstack::db::project_grants(
    $db_user,
    $db_pass,
    $db_name,
    $access_hosts,
    $privs = 'ALL PRIVILEGES',
    $project_name = undef,
) {
    $etc_dir = $project_name ? {
        undef   => $title,
        default => $project_name,
    }

    file { "/etc/${etc_dir}/${title}_grants.mysql":
        content   => template('openstack/db/grants.mysql.erb'),
        owner     => 'root',
        group     => 'root',
        mode      => '0644',
        show_diff => false,
    }
}