evocheck: the crontab is overwritten

This commit is contained in:
Jérémy Lecour 2018-08-18 09:59:26 +02:00
parent 26c46bfb96
commit 47d5146642
2 changed files with 12 additions and 23 deletions

View File

@ -1,25 +1,10 @@
---
- name: evocheck runs normally on first day of month
cron:
cron_file: evocheck
month: "*"
weekday: "*"
day: "1"
hour: "1"
minute: "33"
user: "root"
job: "/usr/share/scripts/evocheck.sh"
state: present
- name: evocheck runs with --cron on all other days of month
cron:
cron_file: evocheck
month: "*"
weekday: "*"
day: "2-31"
hour: "1"
minute: "33"
user: "root"
job: "/usr/share/scripts/evocheck.sh --cron"
state: present
- name: evocheck crontab is updated
template:
src: crontab.j2
dest: /etc/cron.d/evocheck
mode: "0644"
owner: root
group: root
force: yes

View File

@ -0,0 +1,4 @@
# {{ ansible_managed }}
33 1 1 * * root /usr/share/scripts/evocheck.sh
33 1 2-31 * * root /usr/share/scripts/evocheck.sh --cron