2 $lib_path = $::apache::lib_path,
3 $apache_version = $::apache::apache_version,
5 if ! defined(Class['apache']) {
6 fail('You must include the apache base class before using any apache defined resources')
10 $mod_dir = $::apache::mod_dir
12 $_lib = "mod_mpm_${mpm}.so"
13 $_path = "${lib_path}/${_lib}"
14 $_id = "mpm_${mpm}_module"
16 if versioncmp($apache_version, '2.4') >= 0 {
17 file { "${mod_dir}/${mpm}.load":
19 path => "${mod_dir}/${mpm}.load",
20 content => "LoadModule ${_id} ${_path}\n",
23 Exec["mkdir ${mod_dir}"],
25 before => File[$mod_dir],
26 notify => Class['apache::service'],
32 file { "${::apache::mod_enable_dir}/${mpm}.conf":
34 target => "${::apache::mod_dir}/${mpm}.conf",
35 require => Exec["mkdir ${::apache::mod_enable_dir}"],
36 before => File[$::apache::mod_enable_dir],
37 notify => Class['apache::service'],
40 if versioncmp($apache_version, '2.4') >= 0 {
41 file { "${::apache::mod_enable_dir}/${mpm}.load":
43 target => "${::apache::mod_dir}/${mpm}.load",
44 require => Exec["mkdir ${::apache::mod_enable_dir}"],
45 before => File[$::apache::mod_enable_dir],
46 notify => Class['apache::service'],
50 file { "${lib_path}/mod_mpm_itk.so":
52 target => "${lib_path}/mpm_itk.so"
57 if versioncmp($apache_version, '2.4') < 0 {
58 package { "apache2-mpm-${mpm}":
64 class { '::apache::package':
72 file { "${::apache::mod_enable_dir}/${mpm}.conf":
74 target => "${::apache::mod_dir}/${mpm}.conf",
75 require => Exec["mkdir ${::apache::mod_enable_dir}"],
76 before => File[$::apache::mod_enable_dir],
77 notify => Class['apache::service'],
80 if versioncmp($apache_version, '2.4') >= 0 {
81 file { "${::apache::mod_enable_dir}/${mpm}.load":
83 target => "${::apache::mod_dir}/${mpm}.load",
84 require => Exec["mkdir ${::apache::mod_enable_dir}"],
85 before => File[$::apache::mod_enable_dir],
86 notify => Class['apache::service'],
90 file { "${lib_path}/mod_mpm_itk.so":
92 target => "${lib_path}/mpm_itk.so"
97 if versioncmp($apache_version, '2.4') < 0 {
98 package { "apache2-${mpm}":
104 fail("Unsupported osfamily ${::osfamily}")