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 - name: evocheck crontab is updated
cron: template:
cron_file: evocheck src: crontab.j2
month: "*" dest: /etc/cron.d/evocheck
weekday: "*" mode: "0644"
day: "1" owner: root
hour: "1" group: root
minute: "33" force: yes
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

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