From 05a67e2db488b2e65457eac2e8ee3f00cdb20bed Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Thu, 23 Jan 2020 08:03:08 -0600 Subject: [PATCH] keep 5 days of syslog files uncompressed --- roles/rsyslog/tasks/archival.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/rsyslog/tasks/archival.yaml b/roles/rsyslog/tasks/archival.yaml index a637e7a..08b1c57 100644 --- a/roles/rsyslog/tasks/archival.yaml +++ b/roles/rsyslog/tasks/archival.yaml @@ -68,5 +68,5 @@ minute: "0" hour: "1" user: root - job: find /var/log/syslog/ -type f ! -name "*$(date +\%Y\%m\%d)*.log" -name "*.log" -exec xz {} \; + job: find /var/log/syslog/ -type f -name "*.log" -mtime +5 -exec xz {} \; state: "{{ rsyslog_archival_format_enabled | ternary('present', 'absent') }}"