comparison modules/apache/manifests/package.pp @ 257:675c1cc61eaf

Update Apache module to get CentOS 8 support Unfortunately it only fixes some bits. mod_wsgi still needs other approaches This also overrides the vhost modification to make them come last in the import order (after module loading)
author IBBoard <dev@ibboard.co.uk>
date Sun, 22 Dec 2019 14:43:29 -0500
parents 37675581a273
children d9352a684e62
comparison
equal deleted inserted replaced
252:47750947f4dc 257:675c1cc61eaf
1 class apache::package ( 1 class apache::package (
2 $ensure = 'present', 2 $ensure = 'present',
3 $mpm_module = $::apache::params::mpm_module, 3 $mpm_module = $::apache::params::mpm_module,
4 ) inherits ::apache::params { 4 ) inherits ::apache::params {
5
6 # The base class must be included first because it is used by parameter defaults
7 if ! defined(Class['apache']) {
8 fail('You must include the apache base class before using any apache defined resources')
9 }
10
5 case $::osfamily { 11 case $::osfamily {
6 'FreeBSD': { 12 'FreeBSD': {
7 case $mpm_module { 13 case $mpm_module {
8 'prefork': { 14 'prefork': {
9 $set = 'MPM_PREFORK'
10 $unset = 'MPM_WORKER MPM_EVENT'
11 } 15 }
12 'worker': { 16 'worker': {
13 $set = 'MPM_WORKER'
14 $unset = 'MPM_PERFORK MPM_EVENT'
15 } 17 }
16 'event': { 18 'event': {
17 $set = 'MPM_EVENT'
18 $unset = 'MPM_PERFORK MPM_WORKER'
19 } 19 }
20 'itk': { 20 'itk': {
21 $set = undef
22 $unset = undef
23 package { 'www/mod_mpm_itk': 21 package { 'www/mod_mpm_itk':
24 ensure => installed, 22 ensure => installed,
25 } 23 }
26 } 24 }
27 default: { fail("MPM module ${mpm_module} not supported on FreeBSD") } 25 default: { fail("MPM module ${mpm_module} not supported on FreeBSD") }
28 } 26 }
29
30 # Configure ports to have apache build options set correctly
31 if $set {
32 file_line { 'apache SET options in /etc/make.conf':
33 ensure => $ensure,
34 path => '/etc/make.conf',
35 line => "apache24_SET_FORCE=${set}",
36 match => '^apache24_SET_FORCE=.*',
37 before => Package['httpd'],
38 }
39 file_line { 'apache UNSET options in /etc/make.conf':
40 ensure => $ensure,
41 path => '/etc/make.conf',
42 line => "apache24_UNSET_FORCE=${unset}",
43 match => '^apache24_UNSET_FORCE=.*',
44 before => Package['httpd'],
45 }
46 }
47 $apache_package = $::apache::params::apache_name
48 } 27 }
49 default: { 28 default: {
50 $apache_package = $::apache::params::apache_name
51 } 29 }
52 } 30 }
53 31
54 package { 'httpd': 32 package { 'httpd':
55 ensure => $ensure, 33 ensure => $ensure,
56 name => $apache_package, 34 name => $::apache::apache_name,
57 notify => Class['Apache::Service'], 35 notify => Class['Apache::Service'],
58 } 36 }
59 } 37 }