]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Don't enable selinux on redhat systems
authorHunter Haugen <hunter@puppetlabs.com>
Fri, 19 Jun 2015 17:24:49 +0000 (10:24 -0700)
committerHunter Haugen <hunter@puppetlabs.com>
Fri, 19 Jun 2015 17:24:49 +0000 (10:24 -0700)
spec/spec_helper_acceptance.rb

index 383e34bf7aec769250c3a2b6df8b10cb86dad748..0baeed15ed85b59cf696dd00ffeda0af7bd693a0 100644 (file)
@@ -30,6 +30,17 @@ RSpec.configure do |c|
     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