Notify mysql restart from set_mysql_rootpw exec
Since the set_mysql_rootpw exec is only created when the password is being managed, having the mysql resource (which always exists) reference it leads to an error when the mysql root password is not being managed. This commit resolves the issue by having the set mysql rootpw exec notify the mysql restart if it changes.
This commit is contained in:
parent
e472d3b48d
commit
0832a2c1d2
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,6 @@ class mysql::config(
|
|||
command => "service ${service_name} restart",
|
||||
refreshonly => true,
|
||||
path => '/sbin/:/usr/sbin/',
|
||||
subscribe => Exec['set_mysql_rootpw']
|
||||
}
|
||||
|
||||
# manage root password if it is set
|
||||
|
@ -66,6 +65,7 @@ class mysql::config(
|
|||
logoutput => true,
|
||||
unless => "mysqladmin -u root -p${root_password} status > /dev/null",
|
||||
path => '/usr/local/sbin:/usr/bin',
|
||||
notify => Exec['mysqld-restart']
|
||||
}
|
||||
|
||||
file { '/root/.my.cnf':
|
||||
|
|
Loading…
Reference in a new issue