logrotate/tasks/main.yml
Knut Ahlers 29a460a3f8
Initial version
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-01-13 13:39:41 +01:00

18 lines
426 B
YAML

---
- name: Ensure logrotate is installed
apt:
name: logrotate
- name: Install custom logrotate files
template:
src: templates/logrotate.j2
dest: '/etc/logrotate.d/{{ item.name }}'
with_items: '{{ logrotate_configs | default([]) }}'
- name: Test custom configurations
command: 'logrotate -d /etc/logrotate.d/{{ item.name }}'
with_items: '{{ logrotate_configs | default([]) }}'
changed_when: no
...