Puppet Class: mha::node::grants

Defined in:
manifests/node/grants.pp

Overview



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'manifests/node/grants.pp', line 1

class mha::node::grants {

  $nodes = split(inline_template("<%= scope['mha::node::nodes'].map {|v| v['hostname'] }.join(',') %>"), ',')

  # localhost is needed for mha::node::purge_relay_logsa class to run purge_relay_logs.
  $admin_hosts = unique(flatten([ 'localhost', $mha::node::manager, $nodes ]))

  mha::node::grants::admin { $admin_hosts:
    user     => $mha::node::user,
    password => $mha::node::password,
  }

  mha::node::grants::repl { $nodes:
    user     => $mha::node::repl_user,
    password => $mha::node::repl_password,
  }

}