comparison modules/mysql/manifests/server/monitor.pp @ 244:48d3a1948e4d

Update MySQL module
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Dec 2019 14:11:43 -0500
parents 956e484adc12
children
comparison
equal deleted inserted replaced
243:aad92dbc0efc 244:48d3a1948e4d
1 #This is a helper class to add a monitoring user to the database 1 # @summary
2 # This is a helper class to add a monitoring user to the database
3 #
4 # @param mysql_monitor_username
5 # The username to create for MySQL monitoring.
6 # @param mysql_monitor_password
7 # The password to create for MySQL monitoring.
8 # @param mysql_monitor_hostname
9 # The hostname from which the monitoring user requests are allowed access.
10 #
2 class mysql::server::monitor ( 11 class mysql::server::monitor (
3 $mysql_monitor_username, 12 $mysql_monitor_username = '',
4 $mysql_monitor_password, 13 $mysql_monitor_password = '',
5 $mysql_monitor_hostname 14 $mysql_monitor_hostname = ''
6 ) { 15 ) {
7 16
8 Anchor['mysql::server::end'] -> Class['mysql::server::monitor'] 17 Anchor['mysql::server::end'] -> Class['mysql::server::monitor']
9 18
10 mysql_user { "${mysql_monitor_username}@${mysql_monitor_hostname}": 19 mysql_user { "${mysql_monitor_username}@${mysql_monitor_hostname}":
11 ensure => present, 20 ensure => present,
12 password_hash => mysql_password($mysql_monitor_password), 21 password_hash => mysql::password($mysql_monitor_password),
13 require => Class['mysql::server::service'], 22 require => Class['mysql::server::service'],
14 } 23 }
15 24
16 mysql_grant { "${mysql_monitor_username}@${mysql_monitor_hostname}/*.*": 25 mysql_grant { "${mysql_monitor_username}@${mysql_monitor_hostname}/*.*":
17 ensure => present, 26 ensure => present,