diff --git a/manifests/server/config.pp b/manifests/server/config.pp index c1ab21e..d6c0c83 100644 --- a/manifests/server/config.pp +++ b/manifests/server/config.pp @@ -37,9 +37,10 @@ class mysql::server::config { if $mysql::server::manage_config_file { file { 'mysql-config-file': - path => $mysql::server::config_file, - content => template('mysql/my.cnf.erb'), - mode => '0644', + path => $mysql::server::config_file, + content => template('mysql/my.cnf.erb'), + mode => '0644', + selinux_ignore_defaults => true, } } diff --git a/spec/classes/mycnf_template_spec.rb b/spec/classes/mycnf_template_spec.rb index c0607fb..e6f3c16 100644 --- a/spec/classes/mycnf_template_spec.rb +++ b/spec/classes/mycnf_template_spec.rb @@ -11,7 +11,8 @@ describe 'mysql::server' do let(:params) {{ :override_options => { 'mysqld' => { 'socket' => '/var/lib/mysql/mysql.sock' } } }} it do is_expected.to contain_file('mysql-config-file').with({ - :mode => '0644', + :mode => '0644', + :selinux_ignore_defaults => true, }).with_content(/socket = \/var\/lib\/mysql\/mysql.sock/) end end