summaryrefslogtreecommitdiff
path: root/puppet/modules
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-04-07 09:49:52 -0700
committerelijah <elijah@riseup.net>2015-04-07 09:49:52 -0700
commitc79e0282d5b5db3aba0167f13648ccc676fcb96b (patch)
tree5bab632579f9265cd0781e92eed8db59fd972597 /puppet/modules
parentee9fdf0d965cc24a0f421b588b702e1c07caeccf (diff)
rotate deploy logs by size instead of by date.
Diffstat (limited to 'puppet/modules')
-rw-r--r--puppet/modules/site_config/manifests/syslog.pp20
1 files changed, 18 insertions, 2 deletions
diff --git a/puppet/modules/site_config/manifests/syslog.pp b/puppet/modules/site_config/manifests/syslog.pp
index 1b0c1e05..83b49c8e 100644
--- a/puppet/modules/site_config/manifests/syslog.pp
+++ b/puppet/modules/site_config/manifests/syslog.pp
@@ -15,8 +15,24 @@ action(type="mmanon" ipv4.bits="32" mode="rewrite")'
augeas {
'logrotate_leap_deploy':
context => '/files/etc/logrotate.d/leap_deploy/rule',
- changes => [ 'set file /var/log/leap/deploy*.log', 'set rotate 7',
- 'set schedule daily', 'set compress compress',
+ changes => [ 'set file /var/log/leap/deploy.log',
+ 'set rotate 5',
+ 'set size 1M',
+ 'set compress compress',
+ 'set missingok missingok',
+ 'set copytruncate copytruncate' ];
+
+ # NOTE:
+ # the puppet_command script requires the option delaycompress
+ # be set on the summary log file.
+
+ 'logrotate_leap_deploy_summary':
+ context => '/files/etc/logrotate.d/leap_deploy_summary/rule',
+ changes => [ 'set file /var/log/leap/deploy-summary.log',
+ 'set rotate 5',
+ 'set size 100k',
+ 'set delaycompress delaycompress',
+ 'set compress compress',
'set missingok missingok',
'set copytruncate copytruncate' ]
}