module-puppetlabs-mysql/manifests/server/mysqltuner.pp

32 lines
680 B
ObjectPascal
Raw Normal View History

2011-05-25 08:22:43 +02:00
#
class mysql::server::mysqltuner(
$ensure = 'present',
$version = 'v1.3.0',
$source = undef,
) {
if $source {
$_version = $source
$_source = $source
} else {
$_version = $version
$_source = "https://github.com/major/MySQLTuner-perl/raw/${version}/mysqltuner.pl"
}
if $ensure == 'present' {
class { 'staging': }
staging::file { "mysqltuner-${_version}":
source => $_source,
}
file { '/usr/local/bin/mysqltuner':
ensure => $ensure,
mode => '0550',
source => "${::staging::path}/mysql/mysqltuner-${_version}",
}
} else {
file { '/usr/local/bin/mysqltuner':
ensure => $ensure,
}
2011-05-25 08:22:43 +02:00
}
}