Puppet Class: mysql::server::mysqltuner

Defined in:
manifests/server/mysqltuner.pp

Summary

Manage the MySQLTuner package.

Overview

Parameters:

  • ensure (Any) (defaults to: 'present')

    Ensures that the resource exists. Valid values are ‘present’, ‘absent’. Defaults to ‘present’.

  • version (Any) (defaults to: 'v1.3.0')

    The version to install from the major/MySQLTuner-perl github repository. Must be a valid tag. Defaults to ‘v1.3.0’.

  • source (Any) (defaults to: undef)

    Source path for the mysqltuner package.

  • tuner_location (Any) (defaults to: '/usr/local/bin/mysqltuner')

    Destination for the mysqltuner package.



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'manifests/server/mysqltuner.pp', line 12

class mysql::server::mysqltuner (
  $ensure  = 'present',
  $version = 'v1.3.0',
  $source  = undef,
  $tuner_location = '/usr/local/bin/mysqltuner',
) {
  if $source {
    $_source  = $source
  } else {
    $_source  = "https://github.com/major/MySQLTuner-perl/raw/${version}/mysqltuner.pl"
  }
  file { $tuner_location:
    ensure => $ensure,
    mode   => '0550',
    source => $_source,
  }
}