module-mysql/manifests/server.pp
Gabriel Filion fc1210bea8 Too much linting for facts
ng brought a problem with my latest linting commit:

facts are _always_ strings, so unquoting the value that we're testing
against is actually wrong, even though puppet-lint complains.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2013-02-18 16:16:35 -05:00

42 lines
1.2 KiB
Puppet

# manage a mysql server
class mysql::server (
$root_password,
$manage_shorewall = false,
$manage_munin = false,
$munin_password = 'absent',
$manage_nagios = false,
$nagios_password_hash = 'absent',
$backup_cron = false,
$optimize_cron = false,
$backup_dir = '/var/backups/mysql',
$manage_backup_dir = true,
$nagios_notcp = false
) {
case $::operatingsystem {
gentoo: { include mysql::server::gentoo }
centos: { include mysql::server::centos }
debian: { include mysql::server::debian }
default: { include mysql::server::base }
}
if $manage_munin and $::mysql_exists == 'true' {
if $munin_password == 'absent' {
fail('need to set the munin password')
}
case $::operatingsystem {
debian: { include mysql::server::munin::debian }
default: { include mysql::server::munin::default }
}
}
if $manage_nagios and $::mysql_exists == 'true' {
if $nagios_password_hash == 'absent' {
fail('need to set the nagios password hash')
}
include mysql::server::nagios
}
if $manage_shorewall {
include shorewall::rules::mysql
}
}