Fix mysql-server ignoring root_user_use_databag attribute.
Addresses: bug #1273353 The mysql-server recipe was not checking the default['openstack']['db']['root_user_use_databag'] attribute to see if it should use the node['mysql']['server_root_password'] attribute or check a databag for the mysql root password. Change-Id: I589f7e43fc1f15c072d3e50dab6cef25f367075b
This commit is contained in:
parent
14333ce0b3
commit
8b3c4a7b3b
|
@ -50,10 +50,16 @@ end
|
|||
r = resources("template[#{mycnf_template}]")
|
||||
r.notifies_immediately(:restart, 'service[mysql]')
|
||||
|
||||
if node['openstack']['db']['root_user_use_databag']
|
||||
super_password = get_password 'user', node['openstack']['db']['root_user_key']
|
||||
else
|
||||
super_password = node['mysql']['server_root_password']
|
||||
end
|
||||
|
||||
mysql_connection_info = {
|
||||
host: 'localhost',
|
||||
username: 'root',
|
||||
password: node['mysql']['server_root_password']
|
||||
password: super_password
|
||||
}
|
||||
|
||||
mysql_database 'FLUSH PRIVILEGES' do
|
||||
|
|
Loading…
Reference in New Issue