Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Aug 11, 2022
1 parent 72af1c7 commit 1fff7bc
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
52 changes: 30 additions & 22 deletions manifests/package/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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':
Expand Down
6 changes: 0 additions & 6 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1fff7bc

Please sign in to comment.