Skip to content

Commit 5a167c9

Browse files
author
Ryan Coleman
committed
Merge pull request #125 from bodepd/create_my_cnf
Create /root/.my.cnf even when root passwd is not managed
2 parents bb4f15b + 765b5c2 commit 5a167c9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

manifests/config.pp

+5
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@
116116
require => Exec['set_mysql_rootpw'],
117117
}
118118
}
119+
} else {
120+
file { '/root/.my.cnf':
121+
ensure => present,
122+
require => Exec['set_mysql_rootpw'],
123+
}
119124
}
120125

121126
file { '/etc/mysql':

spec/classes/mysql_config_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130

131131
it { should_not contain_exec('set_mysql_rootpw') }
132132

133-
it { should_not contain_file('/root/.my.cnf')}
133+
it { should contain_file('/root/.my.cnf')}
134134

135135
it { should contain_file('/etc/mysql').with(
136136
'owner' => 'root',

0 commit comments

Comments
 (0)