From ed99503fb1b426ad73c4c20b90cf0fe3d98f0bf2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 23 Nov 2014 10:32:50 -0200 Subject: Avoid logrotate errors inside vservers --- manifests/init.pp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index cbdd051..5796fe0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -204,4 +204,17 @@ class apache( command => "/etc/init.d/apache2 force-reload", refreshonly => true, } + + # Avoid this logrotate error: + # /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted) + file { '/etc/logrotate.d/apache2': + ensure => present, + owner => root, + group => root, + mode => 0644, + source => $::virtual ? { + 'vserver' => 'puppet:///modules/apache/logrotate', + default => undef, + }, + } } -- cgit v1.2.3