From 4b4fed942cbeb0af3537cdeb41a700b42b7750b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Fri, 5 Apr 2019 10:08:06 +0200 Subject: [PATCH] copr: install our lograte for httpd with rotate 5 otherwise old logs get deleted --- roles/copr/frontend/files/httpd.logrotate | 12 ++++++++++++ roles/copr/frontend/tasks/main.yml | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 roles/copr/frontend/files/httpd.logrotate 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: