module-puppetlabs-mysql/manifests/server/mysqltuner.pp
Morgan Haskel 3c872abcd2 Remove mysqltuner, fetch with staging instead
mysqltuner is licensed under GPL so we don't want to package it with the
module.
2014-12-16 10:52:39 -08:00

31 lines
680 B
Puppet

#
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,
}
}
}