From 1fff7bcfebfb6071ff563f21c6d0821ea91d0322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Tarti=C3=A8re?= Date: Thu, 11 Aug 2022 08:24:03 -1000 Subject: [PATCH] WIP --- manifests/package/redhat.pp | 52 ++++++++++++++++++++--------------- spec/acceptance/class_spec.rb | 6 ---- 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/manifests/package/redhat.pp b/manifests/package/redhat.pp index e415bdd69..a7e8babd1 100644 --- a/manifests/package/redhat.pp +++ b/manifests/package/redhat.pp @@ -19,17 +19,23 @@ default => 'rhel' } + $want_module_hotfixes = fact('os.distro.id') ? { + 'CentOSStream' => '1', + default => 'absent', + } + if $manage_repo { case $package_source { 'nginx', 'nginx-stable': { yumrepo { 'nginx-release': - baseurl => "https://nginx.org/packages/${_os}/${facts['os']['release']['major']}/\$basearch/", - descr => 'nginx repo', - enabled => '1', - gpgcheck => '1', - priority => '1', - gpgkey => 'https://nginx.org/keys/nginx_signing.key', - before => Package['nginx'], + baseurl => "https://nginx.org/packages/${_os}/${facts['os']['release']['major']}/\$basearch/", + descr => 'nginx repo', + enabled => '1', + gpgcheck => '1', + priority => '1', + gpgkey => 'https://nginx.org/keys/nginx_signing.key', + before => Package['nginx'], + module_hotfixes => $want_module_hotfixes, } if $purge_passenger_repo { @@ -41,13 +47,14 @@ } 'nginx-mainline': { yumrepo { 'nginx-release': - baseurl => "https://nginx.org/packages/mainline/${_os}/${facts['os']['release']['major']}/\$basearch/", - descr => 'nginx repo', - enabled => '1', - gpgcheck => '1', - priority => '1', - gpgkey => 'https://nginx.org/keys/nginx_signing.key', - before => Package['nginx'], + baseurl => "https://nginx.org/packages/mainline/${_os}/${facts['os']['release']['major']}/\$basearch/", + descr => 'nginx repo', + enabled => '1', + gpgcheck => '1', + priority => '1', + gpgkey => 'https://nginx.org/keys/nginx_signing.key', + before => Package['nginx'], + module_hotfixes => $want_module_hotfixes, } if $purge_passenger_repo { @@ -65,14 +72,15 @@ # Also note: Since 6.0.5 there are no nginx packages in the phusion EL7 repository, and nginx packages are expected to come from epel instead yumrepo { 'passenger': - baseurl => "https://oss-binaries.phusionpassenger.com/yum/passenger/el/${facts['os']['release']['major']}/\$basearch", - descr => 'passenger repo', - enabled => '1', - gpgcheck => '0', - repo_gpgcheck => '1', - priority => '1', - gpgkey => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt', - before => Package['nginx'], + baseurl => "https://oss-binaries.phusionpassenger.com/yum/passenger/el/${facts['os']['release']['major']}/\$basearch", + descr => 'passenger repo', + enabled => '1', + gpgcheck => '0', + repo_gpgcheck => '1', + priority => '1', + gpgkey => 'https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt', + before => Package['nginx'], + module_hotfixes => $want_module_hotfixes, } yumrepo { 'nginx-release': diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index e741981d5..10a41dd9d 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -8,12 +8,6 @@ pkg_cmd = 'yum info nginx | grep "^From repo"' pkg_remove_cmd = 'yum -y remove nginx nginx-filesystem passenger' pkg_match = case fact('operatingsystemmajrelease') - when '8' - # Erf, CentOS 8 package nginx and passenger in appstream, but - # has no support for passenger-nginx - pkg_cmd = false - - %r{appstream} when '7' # https://blog.phusion.nl/2020/05/29/passenger-6-0-5/ %r{epel} else