From 363fddf48feb833416eb78aadfbaec30a197a05f Mon Sep 17 00:00:00 2001 From: Christian Sarazin Date: Wed, 26 Jun 2024 09:43:08 +0200 Subject: [PATCH] add some fact checks to not add php5.6 repo to new alma/redhat systems - because remi url for php 5.6 is not valid for alma and redhat 8/9 --- manifests/repo/redhat.pp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/manifests/repo/redhat.pp b/manifests/repo/redhat.pp index d9b58829..c005ecf3 100644 --- a/manifests/repo/redhat.pp +++ b/manifests/repo/redhat.pp @@ -14,21 +14,27 @@ default => '$releasever', # Yum var } + $basearch = $facts['architecture'] ? { + default => '$basearch', # Yum var + } + yumrepo { 'remi': descr => 'Remi\'s RPM repository for Enterprise Linux $releasever - $basearch', - mirrorlist => "https://rpms.remirepo.net/enterprise/${releasever}/remi/mirror", + mirrorlist => "https://rpms.remirepo.net/enterprise/${releasever}/remi/${basearch}/mirror", enabled => 1, gpgcheck => 1, gpgkey => 'https://rpms.remirepo.net/RPM-GPG-KEY-remi', priority => 1, } +if (! ($facts['os']['name'] in ['AlmaLinux','Redhat'])) and ($facts['distro']['major'] in ['8','9']) { yumrepo { 'remi-php56': descr => 'Remi\'s PHP 5.6 RPM repository for Enterprise Linux $releasever - $basearch', - mirrorlist => "https://rpms.remirepo.net/enterprise/${releasever}/php56/mirror", + mirrorlist => "https://rpms.remirepo.net/enterprise/${releasever}/php56/${basearch}/mirror", enabled => 1, gpgcheck => 1, gpgkey => 'https://rpms.remirepo.net/RPM-GPG-KEY-remi2023', priority => 1, } } +}