| Index: modules/logrotate/manifests/init.pp |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/modules/logrotate/manifests/init.pp |
| @@ -0,0 +1,16 @@ |
| +class logrotate { |
| + exec {'ensure_logrotate_status': |
| + command => '/etc/cron.daily/logrotate', |
| + path => ["/usr/bin/", "/bin/"], |
| + onlyif => 'test ! -f /var/lib/logrotate/status' |
| + } |
| + |
| + cron {'logrotate': |
| + ensure => present, |
| + require => Exec['ensure_logrotate_status'], |
| + command => '/usr/sbin/logrotate /etc/logrotate.conf', |
| + user => root, |
| + hour => '0', |
| + minute => '0' |
| + } |
| +} |