Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/trac/manifests/init.pp

Issue 29329593: Issue 2772 - Establish log rotation for Trac logs (Closed)
Patch Set: Created Nov. 2, 2015, 11:31 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | modules/trac/templates/logrotate.erb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/trac/manifests/init.pp
diff --git a/modules/trac/manifests/init.pp b/modules/trac/manifests/init.pp
index 3697f8a2094c7f2645865ab0ac21d43441d31131..c6c04b5e91cfb0aa2ded9f893cb698f3c644250f 100644
--- a/modules/trac/manifests/init.pp
+++ b/modules/trac/manifests/init.pp
@@ -241,6 +241,20 @@ class trac(
children => 1,
require => Exec["deploy_$name"],
}
+
+ logrotate::config {"trac_$name":
+ content => template('trac/logrotate.erb'),
+ ensure => 'present',
+ }
+ }
+
+ # Daily restart required for log rotation of all instances at once
+ cron {'restart-trac-daily':
+ command => 'service spawn-fcgi restart >/tmp/spawn-fcgi-restart.log',
+ environment => hiera('cron::environment', []),
+ hour => '1',
+ minute => '0',
+ user => 'root',
}
}
« no previous file with comments | « no previous file | modules/trac/templates/logrotate.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld