From a520d6115d54b8d3d47ff088d871f3e7f86278ea Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Wed, 6 Jan 2016 14:22:06 -0800 Subject: [PATCH] Logrotate the hound log Since the hound log is now growing instead of being continually overwritten, it needs to be rotated. This log isn't very large, but this is good hygiene. Change-Id: I5c04e75bf867f9001dfc7aaeb62e8a4d023c25bd --- manifests/init.pp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 25bcc91..2cebaa2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -116,4 +116,24 @@ class hound ( template => 'hound/hound.vhost.erb', } + file { '/var/log/hound.log': + owner => 'hound', + group => 'hound', + mode => '0644', + require => User['hound'], + } + + logrotate::file { 'houndlog': + ensure => present, + log => '/var/log/hound.log', + options => ['compress', + 'copytruncate', + 'delaycompress', + 'missingok', + 'rotate 7', + 'daily', + 'notifempty', + ], + } + }