main.yml 321 B

12345678910
  1. ---
  2. - name: nickhammond.logrotate | Install logrotate
  3. action: "{{ansible_pkg_mgr}} pkg=logrotate state=present"
  4. - name: nickhammond.logrotate | Setup logrotate.d scripts
  5. template:
  6. src: logrotate.d.j2
  7. dest: /etc/logrotate.d/{{ item.name }}
  8. with_items: logrotate_scripts
  9. when: logrotate_scripts is defined