Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Create /root/.my.cnf even when root passwd is not managed

When the root password is not managed, it causes mysql to
fail b/c it does not create the /root/.my.cnf file (which causes
all mysql commands from the provider to fail)
  • Loading branch information...
commit 765b5c252754bc1e4303d90a344edf54ddd28d65 1 parent b9e4b0a
@bodepd bodepd authored
Showing with 6 additions and 1 deletion.
  1. +5 −0 manifests/config.pp
  2. +1 −1  spec/classes/mysql_config_spec.rb
View
5 manifests/config.pp
@@ -116,6 +116,11 @@
require => Exec['set_mysql_rootpw'],
}
}
+ } else {
+ file { '/root/.my.cnf':
+ ensure => present,
+ require => Exec['set_mysql_rootpw'],
+ }
}
file { '/etc/mysql':
View
2  spec/classes/mysql_config_spec.rb
@@ -130,7 +130,7 @@
it { should_not contain_exec('set_mysql_rootpw') }
- it { should_not contain_file('/root/.my.cnf')}
+ it { should contain_file('/root/.my.cnf')}
it { should contain_file('/etc/mysql').with(
'owner' => 'root',
Please sign in to comment.
Something went wrong with that request. Please try again.