Move verify backup into separate playbook
This commit is contained in:
parent
09bc8b3d12
commit
f48e702339
2 changed files with 15 additions and 11 deletions
|
@ -35,14 +35,3 @@
|
|||
ansible.builtin.import_tasks: recovery.yml
|
||||
- name: Import tasks specific to systemd
|
||||
ansible.builtin.import_tasks: systemd.yml
|
||||
|
||||
- name: Verify service
|
||||
ansible.builtin.command:
|
||||
cmd: autorestic -v check
|
||||
chdir: "{{ service_path }}"
|
||||
changed_when: false
|
||||
become: true
|
||||
register: cmd_result_verify
|
||||
until: "cmd_result_verify is not failed"
|
||||
retries: 10
|
||||
delay: 10
|
||||
|
|
15
playbooks/verify-backup-yml
Normal file
15
playbooks/verify-backup-yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
- name: Unlock backups
|
||||
hosts: serguzim_net
|
||||
become: true
|
||||
tasks:
|
||||
- name: Verify backup
|
||||
ansible.builtin.command:
|
||||
cmd: autorestic -v check
|
||||
chdir: "{{ (services_path, 'backup') | path_join }}"
|
||||
changed_when: false
|
||||
become: true
|
||||
register: cmd_result_verify
|
||||
until: "cmd_result_verify is not failed"
|
||||
retries: 10
|
||||
delay: 10
|
Loading…
Reference in a new issue