Skip to content

Commit 1191096

Browse files
committed
Drop Debian < 8 and Ubuntu < 16.04
1 parent 23bfa11 commit 1191096

File tree

3 files changed

+43
-98
lines changed

3 files changed

+43
-98
lines changed

manifests/mod/suphp.pp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
#
66
class apache::mod::suphp (
77
) {
8-
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '15.10') >= 0) or
9-
($facts['os']['name'] == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
8+
if $facts['os']['family'] == 'Debian' {
109
fail("suphp was declared EOL by it's creators as of 2013 and so is no longer supported on Ubuntu 15.10/Debian 8 and above. Please use php-fpm")
1110
}
1211
include apache

manifests/params.pp

Lines changed: 41 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -358,79 +358,46 @@
358358
$suphp_addhandler = 'x-httpd-php'
359359
$suphp_engine = 'off'
360360
$suphp_configpath = '/etc/php5/apache2'
361-
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '16.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') < 0) {
362-
# Only the major version is used here
363-
$php_version = '5'
364-
$mod_packages = {
365-
'auth_cas' => 'libapache2-mod-auth-cas',
366-
'auth_kerb' => 'libapache2-mod-auth-kerb',
367-
'auth_openidc' => 'libapache2-mod-auth-openidc',
368-
'auth_gssapi' => 'libapache2-mod-auth-gssapi',
369-
'auth_mellon' => 'libapache2-mod-auth-mellon',
370-
'authnz_pam' => 'libapache2-mod-authnz-pam',
371-
'dav_svn' => 'libapache2-svn',
372-
'fastcgi' => 'libapache2-mod-fastcgi',
373-
'fcgid' => 'libapache2-mod-fcgid',
374-
'geoip' => 'libapache2-mod-geoip',
375-
'intercept_form_submit' => 'libapache2-mod-intercept-form-submit',
376-
'jk' => 'libapache2-mod-jk',
377-
'lookup_identity' => 'libapache2-mod-lookup-identity',
378-
'nss' => 'libapache2-mod-nss',
379-
'pagespeed' => 'mod-pagespeed-stable',
380-
'passenger' => 'libapache2-mod-passenger',
381-
'perl' => 'libapache2-mod-perl2',
382-
'phpXXX' => 'libapache2-mod-phpXXX',
383-
'proxy_html' => 'libapache2-mod-proxy-html',
384-
'python' => 'libapache2-mod-python',
385-
'rpaf' => 'libapache2-mod-rpaf',
386-
'security' => 'libapache2-modsecurity',
387-
'shib2' => 'libapache2-mod-shib2',
388-
'suphp' => 'libapache2-mod-suphp',
389-
'wsgi' => 'libapache2-mod-wsgi',
390-
'xsendfile' => 'libapache2-mod-xsendfile',
391-
}
392-
} else {
393-
$php_version = $facts['operatingsystemmajrelease'] ? {
394-
'9' => '7.0', # Debian Stretch
395-
'16.04' => '7.0', # Ubuntu Xenial
396-
'10' => '7.3', # Debian Buster
397-
'20.04' => '7.4', # Ubuntu Foccal Fossal
398-
default => '7.2', # Ubuntu Bionic, Cosmic and Disco
399-
}
400-
$mod_packages = {
401-
'apreq2' => 'libapache2-mod-apreq2',
402-
'auth_cas' => 'libapache2-mod-auth-cas',
403-
'auth_kerb' => 'libapache2-mod-auth-kerb',
404-
'auth_openidc' => 'libapache2-mod-auth-openidc',
405-
'auth_gssapi' => 'libapache2-mod-auth-gssapi',
406-
'auth_mellon' => 'libapache2-mod-auth-mellon',
407-
'authnz_pam' => 'libapache2-mod-authnz-pam',
408-
'dav_svn' => 'libapache2-mod-svn',
409-
'fastcgi' => 'libapache2-mod-fastcgi',
410-
'fcgid' => 'libapache2-mod-fcgid',
411-
'geoip' => 'libapache2-mod-geoip',
412-
'intercept_form_submit' => 'libapache2-mod-intercept-form-submit',
413-
'jk' => 'libapache2-mod-jk',
414-
'lookup_identity' => 'libapache2-mod-lookup-identity',
415-
'nss' => 'libapache2-mod-nss',
416-
'pagespeed' => 'mod-pagespeed-stable',
417-
'passenger' => 'libapache2-mod-passenger',
418-
'perl' => 'libapache2-mod-perl2',
419-
'phpXXX' => 'libapache2-mod-phpXXX',
420-
'python' => 'libapache2-mod-python',
421-
'rpaf' => 'libapache2-mod-rpaf',
422-
'security' => 'libapache2-mod-security2',
423-
'shib2' => 'libapache2-mod-shib2',
424-
'wsgi' => 'libapache2-mod-wsgi',
425-
'xsendfile' => 'libapache2-mod-xsendfile',
426-
}
361+
362+
$php_version = $facts['operatingsystemmajrelease'] ? {
363+
'9' => '7.0', # Debian Stretch
364+
'16.04' => '7.0', # Ubuntu Xenial
365+
'10' => '7.3', # Debian Buster
366+
'20.04' => '7.4', # Ubuntu Foccal Fossal
367+
default => '7.2', # Ubuntu Bionic, Cosmic and Disco
368+
}
369+
$mod_packages = {
370+
'apreq2' => 'libapache2-mod-apreq2',
371+
'auth_cas' => 'libapache2-mod-auth-cas',
372+
'auth_kerb' => 'libapache2-mod-auth-kerb',
373+
'auth_openidc' => 'libapache2-mod-auth-openidc',
374+
'auth_gssapi' => 'libapache2-mod-auth-gssapi',
375+
'auth_mellon' => 'libapache2-mod-auth-mellon',
376+
'authnz_pam' => 'libapache2-mod-authnz-pam',
377+
'dav_svn' => 'libapache2-mod-svn',
378+
'fastcgi' => 'libapache2-mod-fastcgi',
379+
'fcgid' => 'libapache2-mod-fcgid',
380+
'geoip' => 'libapache2-mod-geoip',
381+
'intercept_form_submit' => 'libapache2-mod-intercept-form-submit',
382+
'jk' => 'libapache2-mod-jk',
383+
'lookup_identity' => 'libapache2-mod-lookup-identity',
384+
'nss' => 'libapache2-mod-nss',
385+
'pagespeed' => 'mod-pagespeed-stable',
386+
'passenger' => 'libapache2-mod-passenger',
387+
'perl' => 'libapache2-mod-perl2',
388+
'phpXXX' => 'libapache2-mod-phpXXX',
389+
'python' => 'libapache2-mod-python',
390+
'rpaf' => 'libapache2-mod-rpaf',
391+
'security' => 'libapache2-mod-security2',
392+
'shib2' => 'libapache2-mod-shib2',
393+
'wsgi' => 'libapache2-mod-wsgi',
394+
'xsendfile' => 'libapache2-mod-xsendfile',
427395
}
396+
428397
$error_log = 'error.log'
429398
$scriptalias = '/usr/lib/cgi-bin'
430399
$access_log_file = 'access.log'
431-
if $::osfamily == 'Debian' and versioncmp($::operatingsystemrelease, '8') < 0 {
432-
$shib2_lib = 'mod_shib_22.so'
433-
} elsif ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '19.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '10') < 0) {
400+
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '19.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '10') < 0) {
434401
$shib2_lib = 'mod_shib2.so'
435402
} else {
436403
$shib2_lib = 'mod_shib.so'
@@ -446,11 +413,7 @@
446413
$fastcgi_lib_path = '/var/lib/apache2/fastcgi'
447414
$mime_support_package = 'mime-support'
448415
$mime_types_config = '/etc/mime.types'
449-
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
450-
$docroot = '/var/www/html'
451-
} else {
452-
$docroot = '/var/www'
453-
}
416+
$docroot = '/var/www/html'
454417
$cas_cookie_path = '/var/cache/apache2/mod_auth_cas/'
455418
$mellon_lock_file = undef
456419
$mellon_cache_size = undef
@@ -510,28 +473,17 @@
510473
}
511474
$alias_icons_path = '/usr/share/apache2/icons'
512475
$error_documents_path = '/usr/share/apache2/error'
513-
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
514-
$dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-dev']
515-
} else {
516-
$dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
517-
}
476+
$dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-dev']
518477

519478
#
520479
# Passenger-specific settings
521480
#
522481

523482
$passenger_conf_file = 'passenger.conf'
524483
$passenger_conf_package_file = undef
525-
526-
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '14.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') < 0) {
527-
$passenger_root = '/usr'
528-
$passenger_ruby = '/usr/bin/ruby'
529-
$passenger_default_ruby = undef
530-
} else {
531-
$passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
532-
$passenger_ruby = undef
533-
$passenger_default_ruby = '/usr/bin/ruby'
534-
}
484+
$passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
485+
$passenger_ruby = undef
486+
$passenger_default_ruby = '/usr/bin/ruby'
535487
$wsgi_socket_prefix = undef
536488
} elsif $::osfamily == 'FreeBSD' {
537489
$user = 'www'

manifests/version.pp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@
2020
}
2121
}
2222
'Debian': {
23-
if $::operatingsystem == 'Ubuntu' and versioncmp($facts['operatingsystemmajrelease'], '13.10') >= 0 {
24-
$default = '2.4'
25-
} elsif $::operatingsystem == 'Debian' and versioncmp($facts['operatingsystemmajrelease'], '8') >= 0 {
26-
$default = '2.4'
27-
} else {
28-
$default = '2.2'
29-
}
23+
$default = '2.4'
3024
}
3125
'FreeBSD': {
3226
$default = '2.4'

0 commit comments

Comments
 (0)