diff --git a/files/httpd/httpd.logrotate b/files/httpd/httpd.logrotate new file mode 100644 index 0000000000..1a23a662d5 --- /dev/null +++ b/files/httpd/httpd.logrotate @@ -0,0 +1,13 @@ +/var/log/httpd/*log { + daily + rotate 7 + missingok + ifempty + compress + compresscmd /usr/bin/bzip2 + uncompresscmd /usr/bin/bunzip2 + compressext .bz2 + dateext + sharedscripts + copytruncate +} diff --git a/tasks/apache.yml b/tasks/apache.yml index 8fd4289417..bb2da77341 100644 --- a/tasks/apache.yml +++ b/tasks/apache.yml @@ -54,3 +54,8 @@ - config - apache +- name: setup logrotate to our needs + copy: src="{{ files }}/httpd/httpd.logrotate" dest=/etc/logrotate.d/httpd + tags: + - config + - apache