---
- name: set up log rotation for mysql
  logrotate: name=mysql path=/var/log/mysql/*.log
  args:
    options:
      - daily
      - rotate 7
      - missingok
      - compress
      - minsize 100k

---
- name: set up log rotation for mysql
  logrotate: name=mysql path=/var/log/mysql/*.log
  args:
    options:
      - daily
      - rotate 7
      - missingok
      - compress
      - postrotate
      - test -x /usr/bin/mysqladmin && /usr/bin/mysqladmin ping > /dev/null && /usr/bin/mysqladmin flush-logs > /dev/null
      - endscript
      - minsize 100k

Fix Percona logrotate to use flush logs, to avoid leaving logs open after deletion.
Fix Percona logrotate to use flush logs, to avoid leaving logs open after deletion.
