diff --git a/roles/copr/frontend/files/httpd.logrotate b/roles/copr/frontend/files/httpd.logrotate new file mode 100644 index 0000000000..d195a77a82 --- /dev/null +++ b/roles/copr/frontend/files/httpd.logrotate @@ -0,0 +1,12 @@ +# managed by Ansible + +/var/log/httpd/*log { + missingok + rotate 5 + notifempty + sharedscripts + delaycompress + postrotate + /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true + endscript +} diff --git a/roles/copr/frontend/tasks/main.yml b/roles/copr/frontend/tasks/main.yml index 620bfee6a3..c405a80770 100644 --- a/roles/copr/frontend/tasks/main.yml +++ b/roles/copr/frontend/tasks/main.yml @@ -42,6 +42,9 @@ - copr - selinux +- name: install httpd logrotate + copy: src="httpd.logrotate" dest="/etc/logrotate.d/httpd" + - name: enable and start httpd service: name=httpd state=started enabled=yes tags: