1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
--- - hosts: all sudo: True roles: - ansible-logrotate - role: ansible-logrotate logrotate_scripts: - name: nginx-options path: /var/log/nginx/options.log options: - daily - role: ansible-logrotate logrotate_scripts: - name: nginx-scripts path: /var/log/nginx/scripts.log scripts: postrotate: "echo test"