apache: Log rotation requires lsof.
This commit is contained in:
parent
d9851631bb
commit
7d9dce035f
2 changed files with 13 additions and 0 deletions
|
@ -5,6 +5,8 @@ import "redhat.pp"
|
||||||
#
|
#
|
||||||
class apache::common {
|
class apache::common {
|
||||||
|
|
||||||
|
include lsof
|
||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
debian,ubuntu: {
|
debian,ubuntu: {
|
||||||
if ! $httpd_user {
|
if ! $httpd_user {
|
||||||
|
@ -80,6 +82,7 @@ class apache::common {
|
||||||
owner => "root",
|
owner => "root",
|
||||||
group => "root",
|
group => "root",
|
||||||
seltype => "httpd_rotatelogs_exec_t",
|
seltype => "httpd_rotatelogs_exec_t",
|
||||||
|
require => Package["lsof"],
|
||||||
}
|
}
|
||||||
if $::operatingsystem == "Fedora" and $::operatingsystemrelease > 17 {
|
if $::operatingsystem == "Fedora" and $::operatingsystemrelease > 17 {
|
||||||
selinux::manage_fcontext { "/usr/sbin/www-logrotate.sh":
|
selinux::manage_fcontext { "/usr/sbin/www-logrotate.sh":
|
||||||
|
|
10
lsof/manifests/init.pp
Normal file
10
lsof/manifests/init.pp
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
# Install lsof
|
||||||
|
#
|
||||||
|
class lsof {
|
||||||
|
|
||||||
|
package { "lsof":
|
||||||
|
ensure => installed,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue