From 08170eb35637d21fa8d3ea94c6f40e8e5aed888c Mon Sep 17 00:00:00 2001 From: Samuel Cassiba Date: Fri, 18 Mar 2016 11:41:44 -0700 Subject: [PATCH] Remove Fedora workaround for SELinux Change-Id: Iefe0cd8037c20627d326e0922476f8499b477d77 --- recipes/apache2-server.rb | 12 ------------ spec/apache2-server-redhat_spec.rb | 5 ----- 2 files changed, 17 deletions(-) diff --git a/recipes/apache2-server.rb b/recipes/apache2-server.rb index b075509..057f311 100644 --- a/recipes/apache2-server.rb +++ b/recipes/apache2-server.rb @@ -63,18 +63,6 @@ include_recipe 'apache2::mod_wsgi' include_recipe 'apache2::mod_rewrite' include_recipe 'apache2::mod_ssl' if node['openstack']['dashboard']['use_ssl'] -# -# Workaround to re-enable selinux after installing apache on a fedora machine that has -# selinux enabled and is currently permissive and the configuration set to enforcing. -# TODO(breu): get the other one working and this won't be necessary -# -execute 'set-selinux-enforcing' do - command '/sbin/setenforce Enforcing ; restorecon -R /etc/httpd' - action :run - - only_if "[ -e /etc/httpd/conf/httpd.conf ] && [ -e /etc/redhat-release ] && [ $(/sbin/sestatus | grep -c '^Current mode:.*permissive') -eq 1 ] && [ $(/sbin/sestatus | grep -c '^Mode from config file:.*enforcing') -eq 1 ]" -end - # delete the openstack-dashboard.conf before reload apache2 service on redhat and centos # since this file is not valid on those platforms for the apache2 service. file "#{node['apache']['dir']}/conf.d/openstack-dashboard.conf" do diff --git a/spec/apache2-server-redhat_spec.rb b/spec/apache2-server-redhat_spec.rb index e62ab6d..1bb4136 100644 --- a/spec/apache2-server-redhat_spec.rb +++ b/spec/apache2-server-redhat_spec.rb @@ -17,11 +17,6 @@ describe 'openstack-dashboard::apache2-server' do expect(chef_run).to run_execute(cmd) end - it 'executes set-selinux-enforcing' do - cmd = '/sbin/setenforce Enforcing ; restorecon -R /etc/httpd' - - expect(chef_run).to run_execute(cmd) - end describe 'certs' do describe 'get seceret' do let(:pem) { chef_run.file('/etc/pki/tls/certs/horizon.pem') }