Puppet Class: profile::mariadb::grants::cloudinfra

Defined in:
modules/profile/manifests/mariadb/grants/cloudinfra.pp

Overview

Parameters:

  • cloudinfra_dbs (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::mariadb::cloudinfra::cloudinfra_dbs'))
  • enc_servers (Array[Stdlib::Fqdn]) (defaults to: lookup('profile::mariadb::cloudinfra::enc_servers'))
  • labspuppet_pass (String) (defaults to: lookup('profile::mariadb::grants::cloudinfra::labspuppet_pass'))
  • repl_pass (String) (defaults to: lookup('profile::mariadb::grants::cloudinfra::repl_pass'))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'modules/profile/manifests/mariadb/grants/cloudinfra.pp', line 1

class profile::mariadb::grants::cloudinfra (
    Array[Stdlib::Fqdn] $cloudinfra_dbs  = lookup('profile::mariadb::cloudinfra::cloudinfra_dbs'),
    Array[Stdlib::Fqdn] $enc_servers     = lookup('profile::mariadb::cloudinfra::enc_servers'),
    String              $labspuppet_pass = lookup('profile::mariadb::grants::cloudinfra::labspuppet_pass'),
    String              $repl_pass       = lookup('profile::mariadb::grants::cloudinfra::repl_pass'),
) {
    $repl_ips = $cloudinfra_dbs.map |Stdlib::Fqdn $fqdn| {
        ipresolve($fqdn, 4)
    }

    $labspuppet_client_ips = $enc_servers.map |Stdlib::Fqdn $fqdn| {
        ipresolve($fqdn, 4)
    }

    file { '/etc/mysql/cloudinfra-grants.sql':
        ensure  => present,
        owner   => 'root',
        group   => 'root',
        mode    => '0400',
        content => template('profile/mariadb/grants/cloudinfra.sql.erb'),
    }
}