diff --git a/roles/copr/backend/files/logrotate/lighttpd b/roles/copr/backend/files/logrotate/lighttpd new file mode 100644 index 0000000000..a32b42940c --- /dev/null +++ b/roles/copr/backend/files/logrotate/lighttpd @@ -0,0 +1,21 @@ +/var/log/lighttpd/access.log { + rotate 5 + daily + missingok + notifempty + prerotate + copr_log_hitcounter.py /var/log/lighttpd/access.log &>/dev/null || : + endscript + postrotate + /usr/bin/killall -HUP lighttpd &>/dev/null || : + endscript +} + +/var/log/lighttpd/error.log { + rotate 5 + missingok + notifempty + postrotate + /usr/bin/killall -HUP lighttpd &>/dev/null || : + endscript +} diff --git a/roles/copr/backend/tasks/main.yml b/roles/copr/backend/tasks/main.yml index 67df17ef79..264934d139 100644 --- a/roles/copr/backend/tasks/main.yml +++ b/roles/copr/backend/tasks/main.yml @@ -180,6 +180,9 @@ - copy: src="cleanup_vms.sh" dest=/etc/cron.hourly/copr_cleanup_vms.sh mode=755 when: not devel +- name: install lighttpd logrotate config + copy: src="logrotate/lighttpd" dest=/etc/logrotate.d/lighttpd owner=root group=root mode=644 + - name: setup monitoring include: "monitoring.yml"