diff --git a/manifests/mod/suphp.pp b/manifests/mod/suphp.pp index 3a16a76aaa..cb2389f213 100644 --- a/manifests/mod/suphp.pp +++ b/manifests/mod/suphp.pp @@ -6,7 +6,7 @@ class apache::mod::suphp ( ) { if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '15.10') >= 0) or - ($facts['os']['name'] == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) { + $facts['os']['family'] == 'Debian' { 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") } include apache diff --git a/manifests/mpm.pp b/manifests/mpm.pp index 644d0e1fd0..b76772eaf3 100644 --- a/manifests/mpm.pp +++ b/manifests/mpm.pp @@ -85,10 +85,8 @@ } if $mpm == 'itk' { - if ( ( $::operatingsystem == 'Ubuntu' ) or ( ($::operatingsystem == 'Debian') and ( versioncmp($::operatingsystemrelease, '8.0.0') >= 0 ) ) ) { - include apache::mpm::disable_mpm_event - include apache::mpm::disable_mpm_worker - } + include apache::mpm::disable_mpm_event + include apache::mpm::disable_mpm_worker package { 'libapache2-mpm-itk': ensure => present, @@ -100,14 +98,14 @@ } if $mpm == 'prefork' { - if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or ( $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8.0.0') >= 0 ) ) { + if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or $::operatingsystem == 'Debian' ) { include apache::mpm::disable_mpm_event include apache::mpm::disable_mpm_worker } } if $mpm == 'worker' { - if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or ( $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8.0.0') >= 0 ) ) { + if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or $::operatingsystem == 'Debian' ) { include apache::mpm::disable_mpm_event include apache::mpm::disable_mpm_prefork } diff --git a/manifests/params.pp b/manifests/params.pp index 6e0a2310df..cfa56b4481 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -459,12 +459,11 @@ 'xsendfile' => 'libapache2-mod-xsendfile', } } + $error_log = 'error.log' $scriptalias = '/usr/lib/cgi-bin' $access_log_file = 'access.log' - if $::osfamily == 'Debian' and versioncmp($::operatingsystemrelease, '8') < 0 { - $shib2_lib = 'mod_shib_22.so' - } elsif ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '19.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '10') < 0) { + if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '19.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '10') < 0) { $shib2_lib = 'mod_shib2.so' } else { $shib2_lib = 'mod_shib.so' @@ -480,11 +479,7 @@ $fastcgi_lib_path = '/var/lib/apache2/fastcgi' $mime_support_package = 'mime-support' $mime_types_config = '/etc/mime.types' - if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) { - $docroot = '/var/www/html' - } else { - $docroot = '/var/www' - } + $docroot = '/var/www/html' $cas_cookie_path = '/var/cache/apache2/mod_auth_cas/' $mellon_lock_file = undef $mellon_cache_size = undef @@ -544,11 +539,7 @@ } $alias_icons_path = '/usr/share/apache2/icons' $error_documents_path = '/usr/share/apache2/error' - if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) { - $dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-dev'] - } else { - $dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev'] - } + $dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-dev'] # # Passenger-specific settings @@ -556,16 +547,9 @@ $passenger_conf_file = 'passenger.conf' $passenger_conf_package_file = undef - - if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '14.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') < 0) { - $passenger_root = '/usr' - $passenger_ruby = '/usr/bin/ruby' - $passenger_default_ruby = undef - } else { - $passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini' - $passenger_ruby = undef - $passenger_default_ruby = '/usr/bin/ruby' - } + $passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini' + $passenger_ruby = undef + $passenger_default_ruby = '/usr/bin/ruby' $wsgi_socket_prefix = undef } elsif $::osfamily == 'FreeBSD' { $user = 'www' diff --git a/manifests/version.pp b/manifests/version.pp index 6d2bb24d0b..f799db73b4 100644 --- a/manifests/version.pp +++ b/manifests/version.pp @@ -20,13 +20,7 @@ } } 'Debian': { - if $::operatingsystem == 'Ubuntu' and versioncmp($facts['operatingsystemmajrelease'], '13.10') >= 0 { - $default = '2.4' - } elsif $::operatingsystem == 'Debian' and versioncmp($facts['operatingsystemmajrelease'], '8') >= 0 { - $default = '2.4' - } else { - $default = '2.2' - } + $default = '2.4' } 'FreeBSD': { $default = '2.4' diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index 2f4405c1f7..f8995a21f0 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -133,13 +133,7 @@ def apache_settings_hash apache['error_log'] = 'error.log' apache['suphp_handler'] = 'x-httpd-php' apache['suphp_configpath'] = '/etc/php5/apache2' - apache['version'] = if osfamily == 'ubuntu' && operatingsystemrelease >= 13.10 - '2.4' - elsif osfamily == 'debian' && operatingsystemrelease >= 8.0 - '2.4' - else - '2.2' - end + apache['version'] = '2.4' apache['mod_ssl_dir'] = apache['mod_dir'] when 'freebsd' apache['httpd_dir'] = '/usr/local/etc/apache24'