File tree Expand file tree Collapse file tree 2 files changed +6
-17
lines changed Expand file tree Collapse file tree 2 files changed +6
-17
lines changed Original file line number Diff line number Diff line change 5151 if $mysql::server::create_root_my_cnf and $root_password_set {
5252 # TODO: use EPP instead of ERB, as EPP can handle Data of Type Sensitive without further ado
5353 file { "${facts['root_home']}/.my.cnf" :
54- content => epp(' mysql/my.cnf.pass.epp' ,$parameters ),
55- owner => ' root' ,
56- mode => ' 0600' ,
54+ content => epp(' mysql/my.cnf.pass.epp' ,$parameters ),
55+ owner => ' root' ,
56+ mode => ' 0600' ,
57+ show_diff => false ,
5758 }
5859
59- # show_diff was added with puppet 3.0
60- if versioncmp($facts [' puppetversion' ], ' 3.0' ) >= 0 {
61- File [" ${facts['root_home']}/.my.cnf" ] { show_diff => false }
62- }
6360 if $mysql::server::create_root_user {
6461 Mysql_user[' root@localhost' ] -> File [" ${facts['root_home']}/.my.cnf" ]
6562 }
Original file line number Diff line number Diff line change 202202
203203 it { is_expected . to contain_mysql_user ( 'root@localhost' ) }
204204
205- if Puppet . version . to_f >= 3.0
206- it { is_expected . to contain_file ( '/root/.my.cnf' ) . with ( show_diff : false ) . that_requires ( 'Mysql_user[root@localhost]' ) }
207- else
208- it { is_expected . to contain_file ( '/root/.my.cnf' ) . that_requires ( 'Mysql_user[root@localhost]' ) }
209- end
205+ it { is_expected . to contain_file ( '/root/.my.cnf' ) . with ( show_diff : false ) . that_requires ( 'Mysql_user[root@localhost]' ) }
210206 end
211207
212208 describe 'when root_password set, create_root_user set to false' do
213209 let ( :params ) { { root_password : 'SET' , create_root_user : false } }
214210
215211 it { is_expected . not_to contain_mysql_user ( 'root@localhost' ) }
216212
217- if Puppet . version . to_f >= 3.0
218- it { is_expected . to contain_file ( '/root/.my.cnf' ) . with ( show_diff : false ) }
219- else
220- it { is_expected . to contain_file ( '/root/.my.cnf' ) }
221- end
213+ it { is_expected . to contain_file ( '/root/.my.cnf' ) . with ( show_diff : false ) }
222214 end
223215
224216 describe 'when root_password set, create_root_my_cnf set to false' do
You can’t perform that action at this time.
0 commit comments