From 1eedba81fd989f3485834037ebfe1f4012d068b3 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Wed, 23 Jan 2019 12:22:01 -0700 Subject: [PATCH] Load python3 mod_wsgi for fedora/rhel8 The python3 containers/systems will have the python3 mod_wsgi and not the python2 version. For now we can manage this in our apache base until a newer puppetlabs-apache supports the newer packages. Change-Id: Id17539959454f2846a432a03c497de52a0f07798 Closes-Bug: #1813053 --- manifests/profile/base/apache.pp | 10 +++++++++- manifests/profile/base/horizon.pp | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/manifests/profile/base/apache.pp b/manifests/profile/base/apache.pp index b3ae1fffe..6cde9462a 100644 --- a/manifests/profile/base/apache.pp +++ b/manifests/profile/base/apache.pp @@ -32,9 +32,17 @@ class tripleo::profile::base::apache( Boolean $enable_status_listener = false, String $status_listener = '127.0.0.1:80', ) { + include ::apache::params + # rhel8/fedora will be python3. See LP#1813053 + if ($::os['name'] == 'Fedora') or ($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) { + class { '::apache': + mod_packages => merge($::apache::params::mod_packages, { 'wsgi' => 'python3-mod_wsgi' }), + mod_libs => merge($::apache::params::mod_libs, { 'wsgi' => 'mod_wsgi_python3.so' }), + } + } + include ::apache::mod::status include ::apache::mod::ssl - if $enable_status_listener { if !defined(Apache::Listen[$status_listener]) { ::apache::listen {$status_listener: } diff --git a/manifests/profile/base/horizon.pp b/manifests/profile/base/horizon.pp index 307c7bb1f..838ff8cea 100644 --- a/manifests/profile/base/horizon.pp +++ b/manifests/profile/base/horizon.pp @@ -84,8 +84,8 @@ class tripleo::profile::base::horizon ( if $step >= 4 or ( $step >= 3 and $is_bootstrap ) { # Horizon - include ::apache::mod::remoteip include ::tripleo::profile::base::apache + include ::apache::mod::remoteip if 'cisco_n1kv' in hiera('neutron::plugins::ml2::mechanism_drivers', undef) { $_profile_support = 'cisco'