Skip to content

Commit 5804d28

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 8df676e commit 5804d28

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
@@ -790,7 +790,7 @@
790790
$verify_command = '/usr/sbin/apachectl -t'
791791
}
792792

793-
if $::osfamily == 'RedHat' and versioncmp($::operatingsystemrelease, '8.0') >= 0 {
793+
if $::osfamily == 'RedHat' and versioncmp($facts['operatingsystemmajrelease'], '8') >= 0 {
794794
$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
795795
} else {
796796
$ssl_protocol = ['all', '-SSLv2', '-SSLv3']

0 commit comments

Comments
 (0)