Skip to content

Commit 3e7d7a2

Browse files
author
Ashley Penney
committed
Merge pull request #245 from embeepea/master
Add HOME environment variable for .my.cnf to mysqladmin command
2 parents e2f3b54 + ae36727 commit 3e7d7a2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

manifests/config.pp

+6-5
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,12 @@
172172
}
173173

174174
exec { 'set_mysql_rootpw':
175-
command => "mysqladmin -u root ${old_pw} password '${root_password}'",
176-
logoutput => true,
177-
unless => "mysqladmin -u root -p'${root_password}' status > /dev/null",
178-
path => '/usr/local/sbin:/usr/bin:/usr/local/bin',
179-
notify => $restart ? {
175+
command => "mysqladmin -u root ${old_pw} password '${root_password}'",
176+
logoutput => true,
177+
environment => "HOME=${root_home}",
178+
unless => "mysqladmin -u root -p'${root_password}' status > /dev/null",
179+
path => '/usr/local/sbin:/usr/bin:/usr/local/bin',
180+
notify => $restart ? {
180181
true => Exec['mysqld-restart'],
181182
false => undef,
182183
},

0 commit comments

Comments
 (0)