Skip to content

Commit

Permalink
Merge pull request #1599 from TheMeier/drop_old_os
Browse files Browse the repository at this point in the history
Drop RHEL 7, CentOS 7&8, VirtuozzoLinux 6&7
  • Loading branch information
bastelfreak authored Jun 5, 2024
2 parents 1cb153a + 992a153 commit 7837ddd
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 58 deletions.
24 changes: 12 additions & 12 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

## Table of contents

* [Contributing](#contributing)
* [Writing proper commits - short version](#writing-proper-commits-short-version)
* [Writing proper commits - long version](#writing-proper-commits-long-version)
* [Dependencies](#dependencies)
* [Note for OS X users](#note-for-os-x-users)
* [The test matrix](#the-test-matrix)
* [Syntax and style](#syntax-and-style)
* [Running the unit tests](#running-the-unit-tests)
* [Unit tests in docker](#unit-tests-in-docker)
* [Integration tests](#integration-tests)
- [Contribution guidelines](#contribution-guidelines)
- [Table of contents](#table-of-contents)
- [Contributing](#contributing)
- [Writing proper commits - short version](#writing-proper-commits---short-version)
- [Writing proper commits - long version](#writing-proper-commits---long-version)
- [Dependencies](#dependencies)
- [Note for OS X users](#note-for-os-x-users)
- [The test matrix](#the-test-matrix)
- [Syntax and style](#syntax-and-style)
- [Running the unit tests](#running-the-unit-tests)
- [Unit tests in docker](#unit-tests-in-docker)
- [Integration tests](#integration-tests)

This module has grown over time based on a range of contributions from
people using it. If you follow these contributing guidelines your patch
Expand Down Expand Up @@ -251,8 +253,6 @@ The following strings are known to work:
* ubuntu2004
* ubuntu2204
* debian11
* centos7
* centos8
* centos9
* almalinux8
* almalinux9
Expand Down
55 changes: 20 additions & 35 deletions manifests/package/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
default => 'rhel'
}

$want_module_hotfixes = if versioncmp(fact('os.release.full'), '8.0') >= 0 {
'1'
} else {
'absent'
}

if $manage_repo {
case $package_source {
'nginx', 'nginx-stable': {
Expand All @@ -36,7 +30,7 @@
priority => '1',
gpgkey => 'https://nginx.org/keys/nginx_signing.key',
before => Package['nginx'],
module_hotfixes => $want_module_hotfixes,
module_hotfixes => '1',
}

if $purge_passenger_repo {
Expand All @@ -55,7 +49,7 @@
priority => '1',
gpgkey => 'https://nginx.org/keys/nginx_signing.key',
before => Package['nginx'],
module_hotfixes => $want_module_hotfixes,
module_hotfixes => '1',
}

if $purge_passenger_repo {
Expand All @@ -66,35 +60,26 @@
}
}
'passenger': {
if ($facts['os']['name'] in ['RedHat', 'CentOS', 'VirtuozzoLinux', 'Rocky', 'AlmaLinux']) and ($facts['os']['release']['major'] in ['6', '7', '8', '9']) {
# 2019-11: Passenger changed their gpg key from: `https://packagecloud.io/phusion/passenger/gpgkey`
# to: `https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt`
# Find the latest key by opening: https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo

# 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'],
module_hotfixes => $want_module_hotfixes,
}
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'],
module_hotfixes => '1',
}

yumrepo { 'nginx-release':
ensure => absent,
before => Package['nginx'],
}
yumrepo { 'nginx-release':
ensure => absent,
before => Package['nginx'],
}

package { $passenger_package_name:
ensure => $passenger_package_ensure,
require => Yumrepo['passenger'],
}
} else {
fail("${facts['os']['name']} version ${facts['os']['release']['major']} is unsupported with \$package_source 'passenger'")
package { $passenger_package_name:
ensure => $passenger_package_ensure,
require => Yumrepo['passenger'],
}
}
default: {
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
}
}
'RedHat': {
if ($facts['os']['name'] in ['RedHat', 'CentOS', 'Oracle', 'virtuozzolinux', 'Rocky', 'AlmaLinux'] and $facts['os']['release']['major'] in ['6', '7', '8', '9']) {
if $facts['os']['name'] in ['RedHat', 'CentOS', 'Oracle', 'virtuozzolinux', 'Rocky', 'AlmaLinux'] {
$_module_os_overrides = {
'manage_repo' => true,
'log_group' => 'nginx',
Expand Down
10 changes: 0 additions & 10 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7",
"8",
"9"
]
Expand All @@ -58,18 +57,9 @@
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"7",
"8",
"9"
]
},
{
"operatingsystem": "VirtuozzoLinux",
"operatingsystemrelease": [
"6",
"7"
]
},
{
"operatingsystem": "SLES"
},
Expand Down

0 comments on commit 7837ddd

Please sign in to comment.