## ## Install MySQL. ## class mysql::install { package { "mysql-server": ensure => installed, } exec { "mysql-password": command => "mysqladmin -u root password '$mysqlpassword'", subscribe => Service["mysqld"], refreshonly => true, } file { "/root/.my.cnf": mode => 600, content => template("mysql/dotmy.cnf.erb"), require => Exec["mysql-password"], } }