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' |
+ } |
+} |