Merge pull request #245 from embeepea/master
Add HOME environment variable for .my.cnf to mysqladmin command
This commit is contained in:
commit
3e7d7a2989
1 changed files with 6 additions and 5 deletions
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue