taken from the apache normal logrotate file, this will rotate the files
weekly or when over 5mb, whichever comes first. I used a glob on the first
line, if you want to avoid other log files, just specify the file list
there. logrotate has good man page.

*/5 * * * * logrotate /etc/logrotate_apache_5mb.conf

--- /etc/logrotate_apache_5mb.conf

/var/log/apache2/*.log
{
        rotate 52
        weekly
        size 5Mb
        missingok
        notifempty
        compress
        create 640 root adm
        sharedscripts
        postrotate
                /etc/init.d/apache2 reload > /dev/null
        endscript
        prerotate
                if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
                        run-parts /etc/logrotate.d/httpd-prerotate; \
                fi; \
        endscript
}




-- 
Brian Coca
Stultorum infinitus est numerus
0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
Pedo mellon a minno

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADn%2BHswJ2u8KzM6ihGqQTAB%2BpXyPczep5cPuOX-cnfMA7Mw%3DjA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to