Edit file File name : rsyslog Content :# Ansible managed /var/log/syslog { daily missingok rotate 7 compress delaycompress notifempty postrotate /usr/lib/rsyslog/rsyslog-rotate endscript prerotate /bin/sleep $((RANDOM%10000)) endscript } /var/log/daemon.log /var/log/kern.log /var/log/auth.log /var/log/user.log /var/log/lpr.log /var/log/cron.log /var/log/debug /var/log/messages { daily missingok rotate 7 compress delaycompress notifempty sharedscripts postrotate /usr/lib/rsyslog/rsyslog-rotate endscript prerotate /bin/sleep $((RANDOM%10000)) endscript } Save