Skip to content

Commit 28a2a70

Browse files
committed
Compare with major release version
CentOS 8 stream doesn't have a minor version so this check likely fails. However, it's irrelevant here and we can use the major release version fact instead. There are a lot more odd cases with facts, but I don't want to touch too much code.
1 parent ffac0c6 commit 28a2a70

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

manifests/default_mods.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
if versioncmp($apache_version, '2.4') >= 0 {
1818
# Lets fork it
1919
# Do not try to load mod_systemd on RHEL/CentOS 6 SCL.
20-
if ( !($::osfamily == 'redhat' and versioncmp($::operatingsystemrelease, '7.0') == -1) and !($::operatingsystem == 'Amazon') ) {
20+
if ( !($::osfamily == 'redhat' and versioncmp($::operatingsystemmajrelease, '7') == -1) and !($::operatingsystem == 'Amazon') ) {
2121
if ($use_systemd) {
2222
::apache::mod { 'systemd': }
2323
}

manifests/mod/fastcgi.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
class apache::mod::fastcgi {
77
include apache
8-
if ($::osfamily == 'Redhat' and versioncmp($::operatingsystemrelease, '7.0') >= 0) {
8+
if ($::osfamily == 'Redhat' and versioncmp($::operatingsystemmajrelease, '7') >= 0) {
99
fail('mod_fastcgi is no longer supported on el7 and above.')
1010
}
1111
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '18.04') >= 0) {

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@
819819
$verify_command = '/usr/sbin/apachectl -t'
820820
}
821821

822-
if $::osfamily == 'RedHat' and versioncmp($::operatingsystemrelease, '8.0') >= 0 {
822+
if $::osfamily == 'RedHat' and versioncmp($facts['operatingsystemmajrelease'], '8') >= 0 {
823823
$ssl_protocol = ['all'] # Implementations of the SSLv2 and SSLv3 protocol versions have been removed from OpenSSL (and hence mod_ssl) because these are no longer considered secure. For additional documentation https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/setting-apache-web-server_deploying-different-types-of-servers
824824
} else {
825825
$ssl_protocol = ['all', '-SSLv2', '-SSLv3']

0 commit comments

Comments
 (0)