diff --git a/roles/mailman/tasks/main.yml b/roles/mailman/tasks/main.yml index 489f34c245..6345a05817 100644 --- a/roles/mailman/tasks/main.yml +++ b/roles/mailman/tasks/main.yml @@ -118,6 +118,11 @@ copy: src=hyperkitty.logrotate.conf dest=/etc/logrotate.d/hyperkitty +# XXX: to remove when the RPM can be used +- name: mailman logging -- rotation + template: src=mailman.logrotate.j2 + dest=/etc/logrotate.d/mailman3 + # # HyperKitty + Postorius setup diff --git a/roles/mailman/templates/mailman.logrotate.j2 b/roles/mailman/templates/mailman.logrotate.j2 new file mode 100644 index 0000000000..5975814267 --- /dev/null +++ b/roles/mailman/templates/mailman.logrotate.j2 @@ -0,0 +1,11 @@ +{{ mailman_webui_basedir }}/var/logs/*.log { + missingok + sharedscripts + su mailman mailman + postrotate + /bin/kill -HUP `cat /run/mailman3/master.pid 2>/dev/null` 2>/dev/null || true + # Don't run "mailman3 reopen" with SELinux on here in the logrotate + # context, it will be blocked + #/usr/bin/mailman3 reopen >/dev/null 2>&1 || true + endscript +}