Skip to content

Commit

Permalink
Merge pull request #698 from mhaskel/MODULES-1928
Browse files Browse the repository at this point in the history
MODULES-1928 - allow log-error to be undef
  • Loading branch information
hunner committed Apr 14, 2015
2 parents eb3fa4e + 298242e commit 97c9eea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
10 changes: 6 additions & 4 deletions manifests/server/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
$mysqluser = $options['mysqld']['user']
}

file { $options['mysqld']['log-error']:
ensure => present,
owner => $mysqluser,
group => $::mysql::server::mysql_group,
if $options['mysqld']['log-error'] {
file { $options['mysqld']['log-error']:
ensure => present,
owner => $mysqluser,
group => $::mysql::server::mysql_group,
}
}

service { 'mysqld':
Expand Down
13 changes: 13 additions & 0 deletions spec/acceptance/mysql_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,18 @@ class { 'mysql::server':
apply_manifest(pp, :catch_changes => true)
end
end

describe 'configuration needed for syslog' do
it 'should work with no errors' do
pp = <<-EOS
class { 'mysql::server':
override_options => { 'mysqld' => { 'log-error' => undef }, 'mysqld_safe' => { 'log-error' => false, 'syslog' => true }},
}
EOS

apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end
end
end

0 comments on commit 97c9eea

Please sign in to comment.