evobackup: execute canary script before executing backup script
This commit is contained in:
parent
7ab102376f
commit
264c58a03d
|
@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
* base: set the lookup option so that resolv.conf searches /etc/hosts before querying a domain name server; the default is the opposite
|
* base: set the lookup option so that resolv.conf searches /etc/hosts before querying a domain name server; the default is the opposite
|
||||||
* post-install: add the pf_states check by default in generateldif.sh script
|
* post-install: add the pf_states check by default in generateldif.sh script
|
||||||
* nagios-nrpe: allow older cipher suites for older Icinga version
|
* nagios-nrpe: allow older cipher suites for older Icinga version
|
||||||
|
* evobackup: execute canary script before executing backup script
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
3
roles/evobackup/files/000-update-evobackup-canary
Executable file
3
roles/evobackup/files/000-update-evobackup-canary
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
update-evobackup-canary --who @daily
|
|
@ -12,6 +12,17 @@
|
||||||
tags:
|
tags:
|
||||||
- evobackup
|
- evobackup
|
||||||
|
|
||||||
|
- name: "Copy update-evobackup-canary script"
|
||||||
|
copy:
|
||||||
|
src: 000-update-evobackup-canary
|
||||||
|
dest: /usr/share/scripts/000-update-evobackup-canary
|
||||||
|
owner: root
|
||||||
|
group: wheel
|
||||||
|
mode: "0755"
|
||||||
|
force: true
|
||||||
|
tags:
|
||||||
|
- evobackup
|
||||||
|
|
||||||
- name: "Fetch daily.local content"
|
- name: "Fetch daily.local content"
|
||||||
command: 'grep "sh /usr/share/scripts/zzz_evobackup" /etc/daily.local'
|
command: 'grep "sh /usr/share/scripts/zzz_evobackup" /etc/daily.local'
|
||||||
check_mode: false
|
check_mode: false
|
||||||
|
@ -29,8 +40,7 @@
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
create: true
|
create: true
|
||||||
when:
|
when:
|
||||||
- not (daily_local_content.stdout
|
- not (daily_local_content.stdout | regex_search('sh /usr/share/scripts/zzz_evobackup'))
|
||||||
| regex_search('sh /usr/share/scripts/zzz_evobackup'))
|
|
||||||
tags:
|
tags:
|
||||||
- evobackup
|
- evobackup
|
||||||
|
|
||||||
|
@ -45,6 +55,17 @@
|
||||||
tags:
|
tags:
|
||||||
- evobackup
|
- evobackup
|
||||||
|
|
||||||
|
- name: "Add canary cron"
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/daily.local
|
||||||
|
line: 'sh /usr/share/scripts/000-update-evobackup-canary'
|
||||||
|
insertafter: 'next_part "EvoBackup output:"'
|
||||||
|
owner: root
|
||||||
|
mode: "0600"
|
||||||
|
create: true
|
||||||
|
tags:
|
||||||
|
- evobackup
|
||||||
|
|
||||||
- name: "Delete legacy evobackup root crontab"
|
- name: "Delete legacy evobackup root crontab"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /var/cron/tabs/root
|
path: /var/cron/tabs/root
|
||||||
|
|
Loading…
Reference in a new issue