ansible: configure log rotation of apache logs (
bug 1347161); r?fubar
MozReview-Commit-ID: FW0YjgdLOTA
new file mode 100644
--- /dev/null
+++ b/ansible/roles/hg-reviewboard/files/logrotate.conf
@@ -0,0 +1,10 @@
+/var/log/httpd/*/*log {
+ daily
+ rotate 720
+ compress
+ delaycompress
+ notifempty
+ postrotate
+ /usr/bin/systemctl reload httpd.service > /dev/null
+ endscript
+}
--- a/ansible/roles/hg-reviewboard/tasks/main.yml
+++ b/ansible/roles/hg-reviewboard/tasks/main.yml
@@ -16,16 +16,19 @@
with_items:
- httpd
# To build mod_wsgi from source.
- httpd-devel
# Used for validating Bugzilla API keys through HTTP pushes.
- mod_authnz_external
- sudo
+- name: add logrotate httpd config
+ copy: src=logrotate.conf dest=/etc/logrotate.d/hg-httpd-logrotate
+
- name: Repository directories present
file: path=/repo/hg/webroot_wsgi state=directory mode=0755
- name: create virtualenv for hgweb
include: ../../../tasks/virtualenv.yml
venv=/var/hg/venv_hgweb
requirements=../roles/hg-reviewboard/files/requirements-hgweb.txt