define mysql::cnf($home, $passwd) { file { "$home/.my.cnf": content => template('mysql/my.cnf.erb'), require => Service['mysql'], owner => root, group => root, mode => '0400', notify => Exec['set_mysql_rootpw'], } }