2018-08-18 09:41:59 +02:00
|
|
|
---
|
|
|
|
|
2019-10-21 15:25:00 +02:00
|
|
|
- name: Check if cron is installed
|
2021-06-28 15:39:04 +02:00
|
|
|
shell: "set -o pipefail && dpkg -l cron 2>/dev/null | grep -q -E '^(i|h)i'"
|
2021-05-18 14:04:54 +02:00
|
|
|
args:
|
|
|
|
executable: /bin/bash
|
2019-10-21 15:25:00 +02:00
|
|
|
failed_when: False
|
|
|
|
changed_when: False
|
|
|
|
check_mode: no
|
|
|
|
register: is_cron_installed
|
|
|
|
|
2018-08-18 09:59:26 +02:00
|
|
|
- name: evocheck crontab is updated
|
|
|
|
template:
|
|
|
|
src: crontab.j2
|
|
|
|
dest: /etc/cron.d/evocheck
|
|
|
|
mode: "0644"
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
force: yes
|
2019-10-21 15:25:00 +02:00
|
|
|
when: is_cron_installed.rc == 0
|