Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure mpm_event is disabled under debian 9 if mpm itk is used #1766

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 32 additions & 19 deletions manifests/mpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -71,35 +71,48 @@
before => Class['apache::service'],
}
}
} else {
package { "apache2-mpm-${mpm}":
ensure => present,
before => [
Class['apache::service'],
File[$::apache::mod_enable_dir],
],
}
}

if $mpm == 'itk' and $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '14.04' {
# workaround https://bugs.launchpad.net/ubuntu/+source/mpm-itk/+bug/1286882
exec {
'/usr/sbin/a2dismod mpm_event':
onlyif => '/usr/bin/test -e /etc/apache2/mods-enabled/mpm_event.load',
if $mpm == 'itk' {

if ( ( $::operatingsystem == 'Ubuntu' ) or ( ($::operatingsystem == 'Debian') and ( versioncmp($::operatingsystemrelease, '8.0.0') >= 0 ) ) ) {
ensure_resource('exec', '/usr/sbin/a2dismod mpm_event', {
onlyif => "/usr/bin/test -e ${apache::mod_enable_dir}/mpm_event.load",
require => Package['httpd'],
before => Package['apache2-mpm-itk'],
before => Class['apache::service'],
})
}
}

if $mpm == 'itk' and ( ( $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '16.04' ) or ( $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9.0.0') >= 0 ) ) {
$packagename = 'libapache2-mpm-itk'
} else {
$packagename = "apache2-mpm-${mpm}"
}

if versioncmp($apache_version, '2.4') < 0 or $mpm == 'itk' {
package { $packagename:
package { 'libapache2-mpm-itk':
ensure => present,
before => [
Class['apache::service'],
File[$::apache::mod_enable_dir],
],
}
if $::apache::mod_enable_dir {
Package[$packagename] {
before => File[$::apache::mod_enable_dir],
}

}

if $mpm == 'prefork' {
if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or ( $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9.0.0') >= 0 ) ) {
ensure_resource('exec', '/usr/sbin/a2dismod mpm_event', {
onlyif => "/usr/bin/test -e ${apache::mod_enable_dir}/mpm_event.load",
require => Package['httpd'],
before => Class['apache::service'],
})
}
}

}

'freebsd': {
class { '::apache::package':
mpm_module => $mpm,
Expand Down