syslog clean up

This commit is contained in:
Ryan Cavicchioni 2020-09-20 22:24:49 -05:00
parent 198730b50e
commit 036cdd6e57
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -68,5 +68,14 @@
minute: "0"
hour: "1"
user: root
job: find /var/log/syslog/ -type f -name "*.log" -mtime +5 -exec xz {} \;
job: find /var/log/syslog/ -mindepth 4 -type f -name "*.log" -mtime +5 -exec xz {} \;
state: "{{ rsyslog_archival_format_enabled | ternary('present', 'absent') }}"
- name: purge log cron job
cron:
name: purge syslog
minute: "0"
hour: "2"
user: root
job: find /var/log/syslog/ -mindepth 4 -type f -name "*.log" -mtime +90 -delete
state: "{{ rsyslog_archival_format_enabled | ternary('present', 'absent') }}"