From 58e403a0a0f8b31b59de0730e16774c66fe94f3d Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Tue, 30 Aug 2022 06:49:11 -0500 Subject: [PATCH] rsyslog: use file date for compression cycle --- 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 a7ed976..6c1b097 100644 --- a/roles/rsyslog/tasks/archival.yaml +++ b/roles/rsyslog/tasks/archival.yaml @@ -68,7 +68,7 @@ minute: "0" hour: "1" user: root - job: find /var/log/syslog/ -mindepth 4 -type f -name "*.log" -mtime +5 -exec xz {} \; + job: find /var/log/syslog/ -mindepth 4 -type f -name "*.log" ! -newerct 00:00:00 -exec nice xz -f {} \; state: "{{ rsyslog_archival_format_enabled | ternary('present', 'absent') }}" - name: purge log cron job