From 60a5d78b14b27dab143aec25df79ab72093422bd Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Fri, 28 Sep 2018 16:04:14 +0200 Subject: [PATCH] Use python3 mod_wsgi when running in fedora This is part of the preparation to run in python3 environments. Additionally, this patch removes exception for fedora to install openstack-selinux in all systems. Change-Id: I8e8a65765bf29bc1a22809fcaba29985c60636f2 --- .../modules/packstack/manifests/apache.pp | 17 +++++++++++++++-- .../modules/packstack/manifests/prereqs.pp | 7 ++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/packstack/puppet/modules/packstack/manifests/apache.pp b/packstack/puppet/modules/packstack/manifests/apache.pp index f97458137..5b21126aa 100644 --- a/packstack/puppet/modules/packstack/manifests/apache.pp +++ b/packstack/puppet/modules/packstack/manifests/apache.pp @@ -1,7 +1,20 @@ class packstack::apache () { - class {'::apache': - purge_configs => false, + # Use python3 for mod_wsg in fedora + if ($::operatingsystem == 'Fedora') or ($::osfamily == 'RedHat' and Integer.new($::operatingsystemmajrelease) > 7) { + class { '::apache': + purge_configs => false, + mod_packages => merge($::apache::params::mod_packages, { + 'wsgi' => 'python3-mod_wsgi', + }), + mod_libs => merge($::apache::params::mod_libs, { + 'wsgi' => 'mod_wsgi_python3.so', + }) + } + }else{ + class {'::apache': + purge_configs => false, + } } if hiera('CONFIG_HORIZON_SSL') == 'y' { diff --git a/packstack/puppet/modules/packstack/manifests/prereqs.pp b/packstack/puppet/modules/packstack/manifests/prereqs.pp index 7efc4d08d..9a1dd9164 100644 --- a/packstack/puppet/modules/packstack/manifests/prereqs.pp +++ b/packstack/puppet/modules/packstack/manifests/prereqs.pp @@ -1,10 +1,7 @@ class packstack::prereqs () { - # We don't have openstack-selinux package for Fedora - if $::operatingsystem != 'Fedora' { - package{ 'openstack-selinux': - ensure => present, - } + package{ 'openstack-selinux': + ensure => present, } package { 'sos':