Merge pull request #245 from embeepea/master

Add HOME environment variable for .my.cnf to mysqladmin command
This commit is contained in:
Ashley Penney 2013-08-27 09:24:30 -07:00
commit 3e7d7a2989

View file

@ -172,11 +172,12 @@ class mysql::config(
}
exec { 'set_mysql_rootpw':
command => "mysqladmin -u root ${old_pw} password '${root_password}'",
logoutput => true,
unless => "mysqladmin -u root -p'${root_password}' status > /dev/null",
path => '/usr/local/sbin:/usr/bin:/usr/local/bin',
notify => $restart ? {
command => "mysqladmin -u root ${old_pw} password '${root_password}'",
logoutput => true,
environment => "HOME=${root_home}",
unless => "mysqladmin -u root -p'${root_password}' status > /dev/null",
path => '/usr/local/sbin:/usr/bin:/usr/local/bin',
notify => $restart ? {
true => Exec['mysqld-restart'],
false => undef,
},