From 1660435bfdda752e66e72e9c0322ce99b5af138f Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Fri, 19 Jun 2015 10:24:49 -0700 Subject: [PATCH] Don't enable selinux on redhat systems --- spec/spec_helper_acceptance.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 383e34bf7..0baeed15e 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -30,6 +30,17 @@ def ip6tables_flush_all_tables hosts.each do |host| copy_module_to(host, :source => proj_root, :module_name => 'firewall') on host, puppet('module install puppetlabs-stdlib --version 3.2.0'), { :acceptable_exit_codes => [0,1] } + if ! UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) + pp = <<-EOS + if $::osfamily == 'RedHat' { + exec { 'setenforce Permissive': + path => ['/bin','/usr/bin','/sbin','/usr/sbin'], + onlyif => 'getenforce | grep Enforcing', + } + } + EOS + apply_manifest(pp, :catch_failures => true) + end end end end