From b05fe374712eb3504fdab18e8cc5aab341bf7f75 Mon Sep 17 00:00:00 2001 From: Patrick Brideau Date: Thu, 13 Oct 2022 11:47:57 -0400 Subject: [PATCH] fix: support for different python version on rhel8 fix: linter --- manifests/apache/conf.pp | 12 ++++++++++++ manifests/apache/vhost.pp | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/manifests/apache/conf.pp b/manifests/apache/conf.pp index 81802f4e..df6975bb 100644 --- a/manifests/apache/conf.pp +++ b/manifests/apache/conf.pp @@ -39,6 +39,18 @@ package_name => 'libapache2-mod-wsgi-py3', mod_path => '/usr/lib/apache2/modules/mod_wsgi.so', }, + 'RedHat' => $facts['os']['release']['major'] ? { + '8' => { + package_name => $puppetboard::python_version ? { + '3.6' => 'python3-mod_wsgi', + '3.8' => 'python38-mod_wsgi', + '3.9' => 'python39-mod_wsgi', + default => fail('python version not supported'), + }, + mod_path => 'modules/mod_wsgi_python3.so', + }, + default => {}, + }, default => {}, } class { 'apache::mod::wsgi': diff --git a/manifests/apache/vhost.pp b/manifests/apache/vhost.pp index 30672b06..e8d54002 100644 --- a/manifests/apache/vhost.pp +++ b/manifests/apache/vhost.pp @@ -51,6 +51,18 @@ package_name => 'libapache2-mod-wsgi-py3', mod_path => '/usr/lib/apache2/modules/mod_wsgi.so', }, + 'RedHat' => $facts['os']['release']['major'] ? { + '8' => { + package_name => $puppetboard::python_version ? { + '3.6' => 'python3-mod_wsgi', + '3.8' => 'python38-mod_wsgi', + '3.9' => 'python39-mod_wsgi', + default => fail('python version not supported'), + }, + mod_path => 'modules/mod_wsgi_python3.so', + }, + default => {}, + }, default => {}, } class { 'apache::mod::wsgi':