2017-11-14 11:07:06 +01:00
|
|
|
---
|
|
|
|
|
2019-10-21 15:25:00 +02:00
|
|
|
- name: Check if cron is installed
|
|
|
|
shell: "dpkg -l cron 2> /dev/null | grep -q -E '^(i|h)i'"
|
|
|
|
failed_when: False
|
|
|
|
changed_when: False
|
|
|
|
register: is_cron_installed
|
|
|
|
|
2017-11-14 11:07:06 +01:00
|
|
|
- name: "log rotation script"
|
|
|
|
template:
|
|
|
|
src: rotate_elasticsearch_logs.j2
|
|
|
|
dest: /etc/cron.daily/rotate_elasticsearch_logs
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: "0750"
|
2019-10-21 15:25:00 +02:00
|
|
|
when: is_cron_installed.rc == 0
|