0b60cdd6a1
'apache' module is needed by 'horizon' 4.1.0 173967ab8dd21a93d6f2b47ff2641d0092f729b1 v 1.2.0 Fuel-CI: disable Partial blueprint: merge-openstack-puppet-modules Change-Id: I0f5ff2fafe058c0263c2ace4bc0ce8f7828d3be0
49 lines
1.4 KiB
Puppet
49 lines
1.4 KiB
Puppet
class apache::package (
|
|
$ensure = 'present',
|
|
$mpm_module = $::apache::params::mpm_module,
|
|
) inherits ::apache::params {
|
|
case $::osfamily {
|
|
'freebsd' : {
|
|
$all_mpms = [
|
|
'www/apache22',
|
|
'www/apache22-worker-mpm',
|
|
'www/apache22-event-mpm',
|
|
'www/apache22-itk-mpm',
|
|
'www/apache22-peruser-mpm',
|
|
]
|
|
if $mpm_module {
|
|
$apache_package = $mpm_module ? {
|
|
'prefork' => 'www/apache22',
|
|
default => "www/apache22-${mpm_module}-mpm"
|
|
}
|
|
} else {
|
|
$apache_package = 'www/apache22'
|
|
}
|
|
$other_mpms = delete($all_mpms, $apache_package)
|
|
# Configure ports to have apache module packages dependent on correct
|
|
# version of apache package (apache22, apache22-worker-mpm, ...)
|
|
file_line { 'APACHE_PORT in /etc/make.conf':
|
|
ensure => $ensure,
|
|
path => '/etc/make.conf',
|
|
line => "APACHE_PORT=${apache_package}",
|
|
match => '^\s*#?\s*APACHE_PORT\s*=\s*',
|
|
before => Package['httpd'],
|
|
}
|
|
# remove other packages
|
|
ensure_resource('package', $other_mpms, {
|
|
ensure => absent,
|
|
before => Package['httpd'],
|
|
require => File_line['APACHE_PORT in /etc/make.conf'],
|
|
})
|
|
}
|
|
default: {
|
|
$apache_package = $::apache::params::apache_name
|
|
}
|
|
}
|
|
package { 'httpd':
|
|
ensure => $ensure,
|
|
name => $apache_package,
|
|
notify => Class['Apache::Service'],
|
|
}
|
|
}
|