Failed to call refresh Apache service

Apache service should be refreshed only in correct order after tidying
mods-enabled directory. In this case better to use the 'File' resource
instead of 'Tidy' resource because last doesn't support notify mechanisms.
Also, we need to remove only 'MPM event' configuration files wich enabled
by default only on the Debian (Ubuntu) systems.

Change-Id: I79f6a5409cd01135e703bca1ebc4d97b9e8f4628
Closes-Bug: #1527256
Closes-Bug: #1522857
This commit is contained in:
Maksim Malchuk 2015-12-17 20:21:02 +03:00
parent 03558ce662
commit 356545e1a1
1 changed files with 9 additions and 6 deletions

View File

@ -25,13 +25,16 @@ class osnailyfacter::apache_mpm {
$mpm_module = 'event'
} else {
$mpm_module = 'worker'
}
tidy { "remove-distro-mpm-modules":
path => $::apache::params::mod_enable_dir,
recurse => true,
matches => [ '*mpm*' ],
rmdirs => false,
file { [
"$::apache::params::mod_enable_dir/mpm_event.load",
"$::apache::params::mod_enable_dir/mpm_event.conf"
]:
ensure => 'absent',
require => Package['httpd'],
notify => Service['httpd'],
}
}
class { "::apache::mod::$mpm_module":