mirror of
https://github.com/luzifer-ansible/logrotate.git
synced 2024-12-23 10:11:17 +00:00
19 lines
426 B
YAML
19 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
|
||
|
|
||
|
...
|