2022-12-06 16:36:21 +01:00
|
|
|
---
|
2022-12-10 03:21:11 +01:00
|
|
|
- name: Shut down docker
|
|
|
|
shell:
|
|
|
|
cmd: "docker compose down --remove-orphans"
|
|
|
|
chdir: "{{ docker_compose_dir }}"
|
|
|
|
|
2022-12-06 23:16:52 +01:00
|
|
|
- name: Backing up for "{{ inventory_hostname }}"
|
2022-12-06 16:36:21 +01:00
|
|
|
shell:
|
2022-12-06 23:16:52 +01:00
|
|
|
cmd: "rclone sync {{ item.1 }} secret:{{ item.1 }}"
|
2022-12-06 16:36:21 +01:00
|
|
|
when: item.0.key == inventory_hostname
|
|
|
|
loop: "{{ backblaze_paths | dict2items | subelements('value') }}"
|
2022-12-06 23:16:52 +01:00
|
|
|
become: true
|
2022-12-10 03:21:11 +01:00
|
|
|
|
2022-12-21 22:28:46 +01:00
|
|
|
- name: Restart docker
|
2022-12-10 03:21:11 +01:00
|
|
|
shell:
|
2022-12-21 22:28:46 +01:00
|
|
|
cmd: "docker compose up -d"
|
2022-12-10 03:21:11 +01:00
|
|
|
chdir: "{{ docker_compose_dir }}"
|