From b75e84a124fca59be60f57dd1801b2700c766ad3 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 11 Aug 2019 15:41:10 -0400 Subject: [PATCH] Add logrotate configuration --- roles/pvc/tasks/main.yml | 6 ++++++ roles/pvc/templates/system/pvc.j2 | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 roles/pvc/templates/system/pvc.j2 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 +}