Browse Source

evocheck: the crontab is updated by the role

projet6062
Jérémy Lecour 3 years ago
parent
commit
26c46bfb96
  1. 1
      CHANGELOG.md
  2. 1
      evocheck/README.md
  3. 1
      evocheck/defaults/main.yml
  4. 25
      evocheck/tasks/cron.yml
  5. 3
      evocheck/tasks/main.yml

1
CHANGELOG.md

@ -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

1
evocheck/README.md

@ -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`)

1
evocheck/defaults/main.yml

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

25
evocheck/tasks/cron.yml

@ -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

3
evocheck/tasks/main.yml

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

Loading…
Cancel
Save