comparison modules/apache/manifests/mpm.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
11 11
12 $_lib = "mod_mpm_${mpm}.so" 12 $_lib = "mod_mpm_${mpm}.so"
13 $_path = "${lib_path}/${_lib}" 13 $_path = "${lib_path}/${_lib}"
14 $_id = "mpm_${mpm}_module" 14 $_id = "mpm_${mpm}_module"
15 15
16 if $apache_version >= 2.4 { 16 if versioncmp($apache_version, '2.4') >= 0 and
17 (($::osfamily != 'FreeBSD') or
18 ($::osfamily == 'FreeBSD' and $mpm == 'itk')) {
19
17 file { "${mod_dir}/${mpm}.load": 20 file { "${mod_dir}/${mpm}.load":
18 ensure => file, 21 ensure => file,
19 path => "${mod_dir}/${mpm}.load", 22 path => "${mod_dir}/${mpm}.load",
20 content => "LoadModule ${_id} ${_path}\n", 23 content => "LoadModule ${_id} ${_path}\n",
21 require => [ 24 require => [
22 Package['httpd'], 25 Package['httpd'],
23 Exec["mkdir ${mod_dir}"], 26 Exec["mkdir ${mod_dir}"],
24 ], 27 ],
25 before => File[$mod_dir], 28 before => File[$mod_dir],
26 notify => Service['httpd'], 29 notify => Class['apache::service'],
27 } 30 }
28 } 31 }
29 32
30 case $::osfamily { 33 case $::osfamily {
31 'debian': { 34 'debian': {
32 file { "${::apache::mod_enable_dir}/${mpm}.conf": 35 file { "${::apache::mod_enable_dir}/${mpm}.conf":
33 ensure => link, 36 ensure => link,
34 target => "${::apache::mod_dir}/${mpm}.conf", 37 target => "${::apache::mod_dir}/${mpm}.conf",
35 require => Exec["mkdir ${::apache::mod_enable_dir}"], 38 require => Exec["mkdir ${::apache::mod_enable_dir}"],
36 before => File[$::apache::mod_enable_dir], 39 before => File[$::apache::mod_enable_dir],
37 notify => Service['httpd'], 40 notify => Class['apache::service'],
38 } 41 }
39 42
40 if $apache_version >= 2.4 { 43 if versioncmp($apache_version, '2.4') >= 0 {
41 file { "${::apache::mod_enable_dir}/${mpm}.load": 44 file { "${::apache::mod_enable_dir}/${mpm}.load":
42 ensure => link, 45 ensure => link,
43 target => "${::apache::mod_dir}/${mpm}.load", 46 target => "${::apache::mod_dir}/${mpm}.load",
44 require => Exec["mkdir ${::apache::mod_enable_dir}"], 47 require => Exec["mkdir ${::apache::mod_enable_dir}"],
45 before => File[$::apache::mod_enable_dir], 48 before => File[$::apache::mod_enable_dir],
46 notify => Service['httpd'], 49 notify => Class['apache::service'],
50 }
51
52 if $mpm == 'itk' {
53 file { "${lib_path}/mod_mpm_itk.so":
54 ensure => link,
55 target => "${lib_path}/mpm_itk.so"
56 }
47 } 57 }
48 } 58 }
49 59
50 if $apache_version < 2.4 { 60 if versioncmp($apache_version, '2.4') < 0 {
51 package { "apache2-mpm-${mpm}": 61 package { "apache2-mpm-${mpm}":
52 ensure => present, 62 ensure => present,
53 } 63 }
54 } 64 }
55 } 65 }