Customize root crontab and daily.local
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Add custome PATH to root crontab Add environment variable to daily.local Add a "next_part" before the evocheck line in daily.local
This commit is contained in:
parent
fe0c7f6add
commit
c9d1bff1c6
|
@ -33,3 +33,5 @@ evomaintenance_hosts: >
|
||||||
{{ evomaintenance_default_hosts
|
{{ evomaintenance_default_hosts
|
||||||
| union(evomaintenance_additional_hosts)
|
| union(evomaintenance_additional_hosts)
|
||||||
| unique }}
|
| unique }}
|
||||||
|
|
||||||
|
cron_root_path: "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
|
||||||
|
|
19
roles/base/tasks/cron.yml
Normal file
19
roles/base/tasks/cron.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
- name: Customize PATH variable of root crontab
|
||||||
|
cron:
|
||||||
|
name: PATH
|
||||||
|
env: true
|
||||||
|
value: "{{ cron_root_path }}"
|
||||||
|
tags:
|
||||||
|
- cron
|
||||||
|
|
||||||
|
- name: Customize daily.local environment
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/daily.local
|
||||||
|
line: 'VERBOSESTATUS=0'
|
||||||
|
insertbefore: BOF
|
||||||
|
owner: root
|
||||||
|
mode: "0644"
|
||||||
|
create: true
|
||||||
|
tags:
|
||||||
|
- cron
|
|
@ -8,3 +8,4 @@
|
||||||
- include: sudo.yml
|
- include: sudo.yml
|
||||||
- include: evobackup.yml
|
- include: evobackup.yml
|
||||||
- include: newsyslog.yml
|
- include: newsyslog.yml
|
||||||
|
- include: cron.yml
|
||||||
|
|
|
@ -36,3 +36,11 @@
|
||||||
create: true
|
create: true
|
||||||
tags:
|
tags:
|
||||||
- evocheck
|
- evocheck
|
||||||
|
|
||||||
|
- name: Add evocheck cron
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/daily.local
|
||||||
|
line: 'next_part "Evocheck output:"'
|
||||||
|
insertbefore: 'sh /usr/share/scripts/evocheck.sh --verbose --cron'
|
||||||
|
tags:
|
||||||
|
- evocheck
|
||||||
|
|
Loading…
Reference in a new issue