evocheck: the crontab is updated by the role

This commit is contained in:
Jérémy Lecour 2018-08-18 09:41:59 +02:00
parent 51f41ff14a
commit 26c46bfb96
5 changed files with 31 additions and 0 deletions

View File

@ -15,6 +15,7 @@ The **patch** part changes incrementally at each release.
* elasticsearch: add http.publish_host variable
* evoacme: disable old certbot cron also in cron.daily
* evocheck: detect installed packages even if "held" by APT (manual fix)
* evocheck: the crontab is updated by the role (default: `True`)
* evolinux-base: add mail related aliases
* generate-ldif: detect installed packages even if "held" by APT
* java: support for Oracle JRE

View File

@ -18,3 +18,4 @@ A separate `exec.yml` file can be imported manually in playbooks or roles to exe
We can force install via :
* `evocheck_force_install: local` : will copy the script provided by the role
* `evocheck_force_install: package` : will install the package via repositories
* `evocheck_update_crontab` : will update the crontab (default: `True`)

View File

@ -1,3 +1,4 @@
---
evocheck_force_install: False
evocheck_update_crontab: True
evocheck_bin_dir: /usr/share/scripts

25
evocheck/tasks/cron.yml Normal file
View File

@ -0,0 +1,25 @@
---
- 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

View File

@ -5,3 +5,6 @@
- include: install_package.yml
when: evocheck_force_install == "package"
- include: cron.yml
when: evocheck_update_crontab