Skip to content

Commit ab9c50d

Browse files
committed
(MODULES-11075) Improve future version handling for RHEL
This change updates the version handling to better future proof the logic when newer versions are shipped. This should prevent having to add things like #2063, #2021, #2038, etc.
1 parent a0416c3 commit ab9c50d

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

manifests/params.pp

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,8 @@
175175
$mod_dir = "${httpd_dir}/conf.modules.d"
176176
} else {
177177
$mod_dir = $facts['operatingsystemmajrelease'] ? {
178-
'7' => "${httpd_dir}/conf.modules.d",
179-
'8' => "${httpd_dir}/conf.modules.d",
180-
default => "${httpd_dir}/conf.d",
178+
'6' => "${httpd_dir}/conf.d",
179+
default => "${httpd_dir}/conf.modules.d",
181180
}
182181
}
183182
$mod_enable_dir = undef
@@ -214,9 +213,8 @@
214213
'auth_mellon' => 'mod_auth_mellon',
215214
'auth_openidc' => 'mod_auth_openidc',
216215
'authnz_ldap' => $facts['operatingsystemmajrelease'] ? {
217-
'7' => 'mod_ldap',
218-
'8' => 'mod_ldap',
219-
default => 'mod_authz_ldap',
216+
'6' => 'mod_authz_ldap',
217+
default => 'mod_ldap',
220218
},
221219
'authnz_pam' => 'mod_authnz_pam',
222220
'fastcgi' => $facts['operatingsystemmajrelease'] ? {
@@ -255,8 +253,9 @@
255253
'shibboleth' => 'shibboleth',
256254
'ssl' => 'mod_ssl',
257255
'wsgi' => $facts['operatingsystemmajrelease'] ? {
258-
'8' => 'python3-mod_wsgi', # RedHat8
259-
default => 'mod_wsgi', # RedHat5, RedHat6, RedHat7
256+
'6' => 'mod_wsgi', # RedHat6
257+
'7' => 'mod_wsgi', # RedHat7
258+
default => 'python3-mod_wsgi', # RedHat8+
260259
},
261260
'dav_svn' => 'mod_dav_svn',
262261
'suphp' => 'mod_suphp',
@@ -267,8 +266,9 @@
267266
$mod_libs = {
268267
'nss' => 'libmodnss.so',
269268
'wsgi' => $facts['operatingsystemmajrelease'] ? {
270-
'8' => 'mod_wsgi_python3.so',
271-
default => 'mod_wsgi.so',
269+
'6' => 'mod_wsgi.so',
270+
'7' => 'mod_wsgi.so',
271+
default => 'mod_wsgi_python3.so',
272272
},
273273
}
274274
$conf_template = 'apache/httpd.conf.erb'
@@ -281,14 +281,12 @@
281281
$mime_types_config = '/etc/mime.types'
282282
$docroot = '/var/www/html'
283283
$alias_icons_path = $facts['operatingsystemmajrelease'] ? {
284-
'7' => '/usr/share/httpd/icons',
285-
'8' => '/usr/share/httpd/icons',
286-
default => '/var/www/icons',
284+
'6' => '/var/www/icons',
285+
default => '/usr/share/httpd/icons',
287286
}
288287
$error_documents_path = $facts['operatingsystemmajrelease'] ? {
289-
'7' => '/usr/share/httpd/error',
290-
'8' => '/usr/share/httpd/error',
291-
default => '/var/www/error'
288+
'6' => '/var/www/error',
289+
default => '/usr/share/httpd/error',
292290
}
293291
if $::osfamily == 'RedHat' {
294292
$wsgi_socket_prefix = '/var/run/wsgi'

0 commit comments

Comments
 (0)