Mercurial > repos > other > Puppet
comparison modules/apache/manifests/mod/prefork.pp @ 36:37675581a273 puppet-3.6
Update Puppet module for Apache (pulls in concat module)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 14 Mar 2015 20:07:04 +0000 |
parents | 956e484adc12 |
children | 675c1cc61eaf |
comparison
equal
deleted
inserted
replaced
35:1bb941522ebf | 36:37675581a273 |
---|---|
8 $apache_version = $::apache::apache_version, | 8 $apache_version = $::apache::apache_version, |
9 ) { | 9 ) { |
10 if defined(Class['apache::mod::event']) { | 10 if defined(Class['apache::mod::event']) { |
11 fail('May not include both apache::mod::prefork and apache::mod::event on the same node') | 11 fail('May not include both apache::mod::prefork and apache::mod::event on the same node') |
12 } | 12 } |
13 if defined(Class['apache::mod::itk']) { | 13 if versioncmp($apache_version, '2.4') < 0 { |
14 fail('May not include both apache::mod::prefork and apache::mod::itk on the same node') | 14 if defined(Class['apache::mod::itk']) { |
15 fail('May not include both apache::mod::prefork and apache::mod::itk on the same node') | |
16 } | |
15 } | 17 } |
16 if defined(Class['apache::mod::peruser']) { | 18 if defined(Class['apache::mod::peruser']) { |
17 fail('May not include both apache::mod::prefork and apache::mod::peruser on the same node') | 19 fail('May not include both apache::mod::prefork and apache::mod::peruser on the same node') |
18 } | 20 } |
19 if defined(Class['apache::mod::worker']) { | 21 if defined(Class['apache::mod::worker']) { |
35 file { "${::apache::mod_dir}/prefork.conf": | 37 file { "${::apache::mod_dir}/prefork.conf": |
36 ensure => file, | 38 ensure => file, |
37 content => template('apache/mod/prefork.conf.erb'), | 39 content => template('apache/mod/prefork.conf.erb'), |
38 require => Exec["mkdir ${::apache::mod_dir}"], | 40 require => Exec["mkdir ${::apache::mod_dir}"], |
39 before => File[$::apache::mod_dir], | 41 before => File[$::apache::mod_dir], |
40 notify => Service['httpd'], | 42 notify => Class['apache::service'], |
41 } | 43 } |
42 | 44 |
43 case $::osfamily { | 45 case $::osfamily { |
44 'redhat': { | 46 'redhat': { |
45 if $apache_version >= 2.4 { | 47 if versioncmp($apache_version, '2.4') >= 0 { |
46 ::apache::mpm{ 'prefork': | 48 ::apache::mpm{ 'prefork': |
47 apache_version => $apache_version, | 49 apache_version => $apache_version, |
48 } | 50 } |
49 } | 51 } |
50 else { | 52 else { |
52 ensure => present, | 54 ensure => present, |
53 path => '/etc/sysconfig/httpd', | 55 path => '/etc/sysconfig/httpd', |
54 line => '#HTTPD=/usr/sbin/httpd.worker', | 56 line => '#HTTPD=/usr/sbin/httpd.worker', |
55 match => '#?HTTPD=/usr/sbin/httpd.worker', | 57 match => '#?HTTPD=/usr/sbin/httpd.worker', |
56 require => Package['httpd'], | 58 require => Package['httpd'], |
57 notify => Service['httpd'], | 59 notify => Class['apache::service'], |
58 } | 60 } |
59 } | 61 } |
60 } | 62 } |
61 'debian', 'freebsd' : { | 63 'debian', 'freebsd' : { |
62 ::apache::mpm{ 'prefork': | 64 ::apache::mpm{ 'prefork': |