File: monitor.pp

package info (click to toggle)
puppet-module-puppetlabs-mysql 15.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 968 kB
  • sloc: ruby: 1,648; sh: 43; makefile: 5
file content (20 lines) | stat: -rw-r--r-- 717 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# @summary
#   Add a monitoring user to the database

$mysql_monitor_password = 'password'
$mysql_monitor_username = 'monitoring'
$mysql_monitor_hostname = $facts['networking']['hostname']

mysql_user { "${mysql_monitor_username}@${mysql_monitor_hostname}":
  ensure        => present,
  password_hash => mysql::password($mysql_monitor_password),
  require       => Class['mysql::server::service'],
}

mysql_grant { "${mysql_monitor_username}@${mysql_monitor_hostname}/*.*":
  ensure     => present,
  user       => "${mysql_monitor_username}@${mysql_monitor_hostname}",
  table      => '*.*',
  privileges => ['PROCESS', 'SUPER'],
  require    => Mysql_user["${mysql_monitor_username}@${mysql_monitor_hostname}"],
}