Skip to content

Commit a1a845c

Browse files
committed
Deprecate mysql::server::monitor and move to an example
1 parent 36cc4ec commit a1a845c

File tree

4 files changed

+20
-70
lines changed

4 files changed

+20
-70
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,6 @@ class { 'mysql::server::backup':
512512
#### Public classes
513513

514514
* [`mysql::server`](#mysqlserver): Installs and configures MySQL.
515-
* [`mysql::server::monitor`](#mysqlservermonitor): Sets up a monitoring user.
516515
* [`mysql::server::mysqltuner`](#mysqlservermysqltuner): Installs MySQL tuner script.
517516
* [`mysql::server::backup`](#mysqlserverbackup): Sets up MySQL backups via cron.
518517
* [`mysql::bindings`](#mysqlbindings): Installs various MySQL language bindings.

examples/monitor.pp

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# @summary
2+
# Add a monitoring user to the database
3+
4+
$mysql_monitor_password = 'password'
5+
$mysql_monitor_username = 'monitoring'
6+
$mysql_monitor_hostname = $::facts['networking']['hostname']
7+
8+
mysql_user { "${mysql_monitor_username}@${mysql_monitor_hostname}":
9+
ensure => present,
10+
password_hash => mysql::password($mysql_monitor_password),
11+
require => Class['mysql::server::service'],
12+
}
13+
14+
mysql_grant { "${mysql_monitor_username}@${mysql_monitor_hostname}/*.*":
15+
ensure => present,
16+
user => "${mysql_monitor_username}@${mysql_monitor_hostname}",
17+
table => '*.*',
18+
privileges => ['PROCESS', 'SUPER'],
19+
require => Mysql_user["${mysql_monitor_username}@${mysql_monitor_hostname}"],
20+
}

manifests/server/monitor.pp

-31
This file was deleted.

spec/classes/mysql_server_monitor_spec.rb

-38
This file was deleted.

0 commit comments

Comments
 (0)