From 7d9dce035f9b2bf821ec36bea8a2028cc2654a43 Mon Sep 17 00:00:00 2001 From: Ossi Herrala Date: Mon, 17 Feb 2014 12:02:16 +0000 Subject: [PATCH] apache: Log rotation requires lsof. --- apache/manifests/init.pp | 3 +++ lsof/manifests/init.pp | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 lsof/manifests/init.pp diff --git a/apache/manifests/init.pp b/apache/manifests/init.pp index 5aff605..b7dc827 100644 --- a/apache/manifests/init.pp +++ b/apache/manifests/init.pp @@ -5,6 +5,8 @@ import "redhat.pp" # class apache::common { + include lsof + case $::operatingsystem { debian,ubuntu: { if ! $httpd_user { @@ -80,6 +82,7 @@ class apache::common { owner => "root", group => "root", seltype => "httpd_rotatelogs_exec_t", + require => Package["lsof"], } if $::operatingsystem == "Fedora" and $::operatingsystemrelease > 17 { selinux::manage_fcontext { "/usr/sbin/www-logrotate.sh": diff --git a/lsof/manifests/init.pp b/lsof/manifests/init.pp new file mode 100644 index 0000000..8a8e3ae --- /dev/null +++ b/lsof/manifests/init.pp @@ -0,0 +1,10 @@ + +# Install lsof +# +class lsof { + + package { "lsof": + ensure => installed, + } + +}