Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (20 sloc) 573 Bytes
# Documentation: https://github.com/nickhammond/ansible-logrotate
logrotate_scripts:
- name: wordpress-sites
path: "{{ www_root }}/**/logs/*.log"
options:
- weekly
- maxsize 50M
- missingok
- rotate 8
- compress
- delaycompress
- notifempty
- create 0640 {{ web_user }} {{ web_group }}
- sharedscripts
scripts:
prerotate: |
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
run-parts /etc/logrotate.d/httpd-prerotate; \
fi \
postrotate: service nginx rotate
You can’t perform that action at this time.