From 602907dd7cdd5d758f3666f882c0eed5d35cccae Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 10 Nov 2019 15:37:48 -0600 Subject: [PATCH] Add rsyslog compress cron job --- 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 78f8dff..8678bdc 100644 --- a/roles/rsyslog/tasks/archival.yaml +++ b/roles/rsyslog/tasks/archival.yaml @@ -38,5 +38,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 "*$(date +\%Y\%m\%d)*.log" -name "*.log" -exec xz {} \; state: "{{ rsyslog_archival_format_enabled | ternary('present', 'absent') }}"