From 4523bd7dcc2c11a0f171d48c97c7a6bd2c93c4c0 Mon Sep 17 00:00:00 2001 From: "Lushaj, Valdrin" Date: Mon, 27 Nov 2023 17:50:27 +0100 Subject: [PATCH 1/3] Add Support for RedHat/CentOS 9 --- manifests/install.pp | 3 +++ manifests/params.pp | 1 + metadata.json | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/manifests/install.pp b/manifests/install.pp index 6a738435..e7c16964 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -215,6 +215,9 @@ if String($python::version) =~ /^python3/ { $pip_package = "${python}-pip" $pip_provider = $python.regsubst(/^.*python3\.?/,'pip3.').regsubst(/\.$/,'') + } elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '9') >= 0) { + $pip_package = 'python3-pip' + $pip_provider = pip3 } elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '8') >= 0) { $pip_package = 'python3-pip' $pip_provider = pip3 diff --git a/manifests/params.pp b/manifests/params.pp index 4713c7df..50937bb9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -28,6 +28,7 @@ $gunicorn_package_name = $facts['os']['family'] ? { 'RedHat' => $facts['os']['release']['major'] ? { + '9' => 'python3-gunicorn', '8' => 'python3-gunicorn', default => 'python-gunicorn', }, diff --git a/metadata.json b/metadata.json index 9e4dd1fc..75189ed8 100644 --- a/metadata.json +++ b/metadata.json @@ -24,7 +24,8 @@ "operatingsystem": "CentOS", "operatingsystemrelease": [ "7", - "8" + "8", + "9" ] }, { From f7b0196c9038de79ee1e0d5f0123387baac60077 Mon Sep 17 00:00:00 2001 From: "Lushaj, Valdrin" Date: Wed, 29 Nov 2023 10:00:48 +0100 Subject: [PATCH 2/3] removed unnecessary code, since case >= 8 already does the same thing --- manifests/install.pp | 3 --- 1 file changed, 3 deletions(-) diff --git a/manifests/install.pp b/manifests/install.pp index e7c16964..6a738435 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -215,9 +215,6 @@ if String($python::version) =~ /^python3/ { $pip_package = "${python}-pip" $pip_provider = $python.regsubst(/^.*python3\.?/,'pip3.').regsubst(/\.$/,'') - } elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '9') >= 0) { - $pip_package = 'python3-pip' - $pip_provider = pip3 } elsif ($facts['os']['family'] == 'RedHat') and (versioncmp($facts['os']['release']['major'], '8') >= 0) { $pip_package = 'python3-pip' $pip_provider = pip3 From b61c32f6f7a1b563638b190c836cd10afe7c70a1 Mon Sep 17 00:00:00 2001 From: "Lushaj, Valdrin" Date: Thu, 30 Nov 2023 12:20:34 +0100 Subject: [PATCH 3/3] Standardize gunicorn package references across RHEL versions --- manifests/params.pp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 50937bb9..49bfdeac 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -28,9 +28,8 @@ $gunicorn_package_name = $facts['os']['family'] ? { 'RedHat' => $facts['os']['release']['major'] ? { - '9' => 'python3-gunicorn', - '8' => 'python3-gunicorn', - default => 'python-gunicorn', + '7' => 'python-gunicorn', + default => 'python3-gunicorn', }, default => 'gunicorn', }