2024-05-25 10:09:11 +02:00
|
|
|
- hosts: nas
|
|
|
|
name: Restore docker
|
|
|
|
ignore_unreachable: false
|
|
|
|
tasks:
|
2024-05-25 10:27:15 +02:00
|
|
|
- name: Stop running containers
|
2024-05-25 11:04:16 +02:00
|
|
|
ansible.builtin.shell: for i in `/share/ZFS530_DATA/.qpkg/container-station/bin/docker ps -a|egrep -e '{{ app }}.*'|awk '{print $NF}' `; do /share/ZFS530_DATA/.qpkg/container-station/bin/docker stop $i;done
|
2024-05-25 10:09:11 +02:00
|
|
|
- name: Restore folder
|
2024-05-25 11:10:53 +02:00
|
|
|
ansible.builtin.shell: 'rsync -arv root@192.168.77.189:/srv/dev-disk-by-uuid-02fbe97a-cd9a-4511-8bd5-21f8516353ee/docker_data/{{ resdate }}/{{ app }} /share/docker_data/'
|
2024-05-25 10:48:49 +02:00
|
|
|
when: inventory_hostname in groups['nas']
|
|
|
|
- name: Start running containers
|
2024-05-25 11:04:16 +02:00
|
|
|
ansible.builtin.shell: for i in `/share/ZFS530_DATA/.qpkg/container-station/bin/docker ps -a|egrep -e '{{ app }}.*'|awk '{print $NF}' `; do /share/ZFS530_DATA/.qpkg/container-station/bin/docker start $i;done
|