evocheck: the crontab is overwritten
This commit is contained in:
parent
26c46bfb96
commit
47d5146642
|
@ -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
|
|
||||||
|
|
4
evocheck/templates/crontab.j2
Normal file
4
evocheck/templates/crontab.j2
Normal 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
|
Loading…
Reference in a new issue