dont print diff root password in diff

puppet 2.7 doesnt support show_diff

hash alignment
This commit is contained in:
tphoney 2015-05-20 12:05:29 +01:00
parent fd03318331
commit d2b33b5af2
2 changed files with 15 additions and 4 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@ spec/fixtures/
coverage/
.idea/
*.iml
log/

View file

@ -12,10 +12,20 @@ class mysql::server::root_password {
}
if $mysql::server::create_root_my_cnf == true and $mysql::server::root_password != 'UNSET' {
file { "${::root_home}/.my.cnf":
content => template('mysql/my.cnf.pass.erb'),
owner => 'root',
mode => '0600',
# Puppet 2.7 doesnt support show_diff
if versioncmp($::puppetversion, '3.0') <= 0 {
file { "${::root_home}/.my.cnf":
content => template('mysql/my.cnf.pass.erb'),
owner => 'root',
mode => '0600',
show_diff => false,
}
} else {
file { "${::root_home}/.my.cnf":
content => template('mysql/my.cnf.pass.erb'),
owner => 'root',
mode => '0600',
}
}
if $mysql::server::create_root_user == true {
Mysql_user['root@localhost'] -> File["${::root_home}/.my.cnf"]