diff --git a/roles/pvc/tasks/main.yml b/roles/pvc/tasks/main.yml index 79db722..641d0d0 100644 --- a/roles/pvc/tasks/main.yml +++ b/roles/pvc/tasks/main.yml @@ -29,6 +29,12 @@ src: system/blacklist.j2 dest: /etc/modprobe.d/blacklist.conf +# Logrotate configuration +- name: add logrotate configuration + template: + src: system/pvc.j2 + dest: /etc/logrotate.d/pvc + # Install base databases (coordinators only) - include: ceph/main.yml tags: pvc-ceph diff --git a/roles/pvc/templates/system/pvc.j2 b/roles/pvc/templates/system/pvc.j2 new file mode 100644 index 0000000..307196a --- /dev/null +++ b/roles/pvc/templates/system/pvc.j2 @@ -0,0 +1,20 @@ +/var/log/pvc/*.log { + weekly + rotate 8 + copytruncate + delaycompress + compress + notifempty + missingok + su root root +} +/var/log/pvc/*/*.log { + weekly + rotate 8 + copytruncate + delaycompress + compress + notifempty + missingok + su root root +}