Mercurial > repos > other > Puppet
comparison modules/apache/manifests/mod/prefork.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 |
---|---|
3 $minspareservers = '5', | 3 $minspareservers = '5', |
4 $maxspareservers = '20', | 4 $maxspareservers = '20', |
5 $serverlimit = '256', | 5 $serverlimit = '256', |
6 $maxclients = '256', | 6 $maxclients = '256', |
7 $maxrequestsperchild = '4000', | 7 $maxrequestsperchild = '4000', |
8 $apache_version = $::apache::apache_version, | 8 $apache_version = undef, |
9 ) { | 9 ) { |
10 include ::apache | |
11 $_apache_version = pick($apache_version, $apache::apache_version) | |
10 if defined(Class['apache::mod::event']) { | 12 if defined(Class['apache::mod::event']) { |
11 fail('May not include both apache::mod::prefork and apache::mod::event on the same node') | 13 fail('May not include both apache::mod::prefork and apache::mod::event on the same node') |
12 } | 14 } |
13 if versioncmp($apache_version, '2.4') < 0 { | 15 if versioncmp($_apache_version, '2.4') < 0 { |
14 if defined(Class['apache::mod::itk']) { | 16 if defined(Class['apache::mod::itk']) { |
15 fail('May not include both apache::mod::prefork and apache::mod::itk on the same node') | 17 fail('May not include both apache::mod::prefork and apache::mod::itk on the same node') |
16 } | 18 } |
17 } | 19 } |
18 if defined(Class['apache::mod::peruser']) { | 20 if defined(Class['apache::mod::peruser']) { |
22 fail('May not include both apache::mod::prefork and apache::mod::worker on the same node') | 24 fail('May not include both apache::mod::prefork and apache::mod::worker on the same node') |
23 } | 25 } |
24 File { | 26 File { |
25 owner => 'root', | 27 owner => 'root', |
26 group => $::apache::params::root_group, | 28 group => $::apache::params::root_group, |
27 mode => '0644', | 29 mode => $::apache::file_mode, |
28 } | 30 } |
29 | 31 |
30 # Template uses: | 32 # Template uses: |
31 # - $startservers | 33 # - $startservers |
32 # - $minspareservers | 34 # - $minspareservers |
42 notify => Class['apache::service'], | 44 notify => Class['apache::service'], |
43 } | 45 } |
44 | 46 |
45 case $::osfamily { | 47 case $::osfamily { |
46 'redhat': { | 48 'redhat': { |
47 if versioncmp($apache_version, '2.4') >= 0 { | 49 if versioncmp($_apache_version, '2.4') >= 0 { |
48 ::apache::mpm{ 'prefork': | 50 ::apache::mpm{ 'prefork': |
49 apache_version => $apache_version, | 51 apache_version => $_apache_version, |
50 } | 52 } |
51 } | 53 } |
52 else { | 54 else { |
53 file_line { '/etc/sysconfig/httpd prefork enable': | 55 file_line { '/etc/sysconfig/httpd prefork enable': |
54 ensure => present, | 56 ensure => present, |
58 require => Package['httpd'], | 60 require => Package['httpd'], |
59 notify => Class['apache::service'], | 61 notify => Class['apache::service'], |
60 } | 62 } |
61 } | 63 } |
62 } | 64 } |
63 'debian', 'freebsd' : { | 65 'debian', 'freebsd': { |
66 ::apache::mpm{ 'prefork': | |
67 apache_version => $_apache_version, | |
68 } | |
69 } | |
70 'Suse': { | |
64 ::apache::mpm{ 'prefork': | 71 ::apache::mpm{ 'prefork': |
65 apache_version => $apache_version, | 72 apache_version => $apache_version, |
73 lib_path => '/usr/lib64/apache2-prefork', | |
74 } | |
75 } | |
76 'gentoo': { | |
77 ::portage::makeconf { 'apache2_mpms': | |
78 content => 'prefork', | |
66 } | 79 } |
67 } | 80 } |
68 default: { | 81 default: { |
69 fail("Unsupported osfamily ${::osfamily}") | 82 fail("Unsupported osfamily ${::osfamily}") |
70 } | 83 } |