# Documentation: https://galaxy.ansible.com/list#/roles/1117
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

# Documentation: https://galaxy.ansible.com/list#/roles/1117
logrotate_scripts:
  - name: wordpress-sites
    path: "{{ www_root }}/**/logs/*.log"
    options:
      - weekly
      - maxsize 50M
      - missingok
      - rotate 8
      - compress
      - delaycompress
      - notifempty
      - create 0660 {{ 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

Add group write permissions to rotated logs.
Add group write permissions to rotated logs.

This allows wp-cli scripts to write to logs when run as the admin
user (or any user in the www-data group).
