compress merged logs under /var/log/hosts
This commit is contained in:
parent
14eb1bc04e
commit
b79003cfda
3 changed files with 6 additions and 0 deletions
1
roles/base/files/compress-log.cron
Normal file
1
roles/base/files/compress-log.cron
Normal file
|
@ -0,0 +1 @@
|
|||
0 06 * * * root /usr/bin/find /var/log/hosts -type f -name "*.log" -print | grep -v "$(date +'/%Y/%m/%d/')" | xargs -n1 xz -1 > /dev/null
|
0
roles/base/files/rsyslog/compress-log.cron
Normal file
0
roles/base/files/rsyslog/compress-log.cron
Normal file
|
@ -504,5 +504,10 @@
|
|||
- config
|
||||
- python3alternative
|
||||
|
||||
- name: daily cron job to compress merged log under /var/log/hosts
|
||||
copy: src=compress-log.cron dest=/etc/cron.d/ mode=0644
|
||||
tags:
|
||||
- compress
|
||||
|
||||
- name: Set crypto-policy to LEGACY on fedora 33 hosts to get 2fa working
|
||||
import_tasks: crypto-policies.yml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue