Add /var/log/syslog/ clean up cron job

This commit is contained in:
Ryan Cavicchioni 2020-10-10 11:00:32 -05:00
parent e9113856ea
commit 3347935780
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -77,5 +77,7 @@
minute: "0"
hour: "2"
user: root
job: find /var/log/syslog/ -mindepth 4 -type f -name "*.log" -mtime +90 -delete
job: >
find /var/log/syslog/ -mindepth 4 -type f -name "*.log.xz" -mtime +90 -delete &&
find /var/log/syslog/ -mindepth 3 -type d -empty -delete
state: "{{ rsyslog_archival_format_enabled | ternary('present', 'absent') }}"