16 lines
542 B
YAML
16 lines
542 B
YAML
- name: Get infos on volume "{{ volume.name }}"
|
|
community.docker.docker_volume_info:
|
|
name: "{{ volume.name }}"
|
|
register: volume_info_result
|
|
|
|
- name: Restore volume "{{ volume.name }}"
|
|
ansible.builtin.command:
|
|
cmd: sudo autorestic -c .autorestic.all.yml restore -l {{ volume.name }} --from borgbase
|
|
chdir: "{{ (services_path, 'backup') | path_join }}"
|
|
when: not volume_info_result.exists
|
|
changed_when: true
|
|
become: true
|
|
register: cmd_result_backup
|
|
until: "cmd_result_backup is not failed"
|
|
retries: 10
|
|
delay: 10
|