Merge pull request #125 from bodepd/create_my_cnf

Create /root/.my.cnf even when root passwd is not managed
This commit is contained in:
Ryan Coleman 2012-10-13 10:14:23 -07:00
commit 5a167c9eef
2 changed files with 6 additions and 1 deletions

View file

@ -116,6 +116,11 @@ class mysql::config(
require => Exec['set_mysql_rootpw'],
}
}
} else {
file { '/root/.my.cnf':
ensure => present,
require => Exec['set_mysql_rootpw'],
}
}
file { '/etc/mysql':

View file

@ -130,7 +130,7 @@ describe 'mysql::config' do
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',