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

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

Issue 9351014: Add logrotate cronjob to all servers, don`t run logrotate unnecessarily on provisioning and use con… (Closed)
Patch Set: Created Feb. 7, 2013, 3:06 p.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
Index: modules/logrotate/manifests/init.pp
===================================================================
new file mode 100644
--- /dev/null
+++ b/modules/logrotate/manifests/init.pp
@@ -0,0 +1,18 @@
+class logrotate {
+ exec {'ensure_logrotate_status':
+ command => '/etc/cron.daily/logrotate',
+ path => [ "/usr/bin/", "/bin/" ],
Felix Dahlke 2013/02/07 15:38:41 Mind getting rid of the whitespace between path an
+ onlyif => 'test ! -f /var/lib/logrotate/status'
+ }
+
+ cron {'logrotate':
+ ensure => present,
+ require => [
Felix Dahlke 2013/02/07 15:38:41 Should be fine without the enclosing square bracke
+ Exec['ensure_logrotate_status']
+ ],
+ command => '/usr/sbin/logrotate /etc/logrotate.conf',
+ user => root,
+ hour => '0',
+ minute => '0'
+ }
+}

Powered by Google App Engine
This is Rietveld