diff --git a/Rexfile b/Rexfile index 1b19d8e..d678371 100644 --- a/Rexfile +++ b/Rexfile @@ -570,6 +570,19 @@ task prepare_user => PATH => '/home/cpantesters/perl5/bin:/opt/local/perlbrew/bin:/opt/local/perlbrew/perls/perl-5.24.0/bin:/usr/local/bin:/usr/bin:/bin', MAILTO => 'doug@preaction.me', }; + + Rex::Logger::info( 'Configuring logrotate' ); + file '/etc/logrotate.d/cpantesters', + source => 'etc/logrotate-cpantesters.conf', + owner => 'root', + group => 'root', + mode => 644, + ; + file '/home/cpantesters/var/log', + ensure => 'directory', + owner => 'cpantesters', + group => 'cpantesters', + ; }; }; diff --git a/etc/logrotate-cpan.conf b/etc/logrotate-cpan.conf index 401385d..ddc20a9 100644 --- a/etc/logrotate-cpan.conf +++ b/etc/logrotate-cpan.conf @@ -1,4 +1,5 @@ +daily compress minsize 10M rotate 9 diff --git a/etc/logrotate-cpantesters.conf b/etc/logrotate-cpantesters.conf new file mode 100644 index 0000000..bd8223d --- /dev/null +++ b/etc/logrotate-cpantesters.conf @@ -0,0 +1,9 @@ + +daily +compress +minsize 10M +rotate 9 +notifempty + +/home/cpantesters/var/log/*.log { } +/home/cpantesters/var/log/*/*.log { }