Re: [Puppet Users] Puppet equivalent for mysql[''tunable''] in chef

Adam Heinz
Mon, 19 Mar 2012 19:18:13 -0000

puppet 2.6+, derived from https://github.com/camptocamp/puppet-mysql

  $mycnf = $::operatingsystem ? {
    /RedHat|Fedora|CentOS/ => "/etc/my.cnf",
    default => "/etc/mysql/my.cnf",
  }

  augeas { $mycnf:
    context => "/files$mycnf",
    changes => [
      "set mysqld/key_buffer 250M",
      "set mysqld/max_connections 800",
      "set mysqld/wait_timeout 180",
    ],
    require => Package["mysql"],
    notify => Service["mysql"],
    incl    => $mycnf,
    lens    => "Mysql.lns",
  }