2024-11-14 11:13:49 +01:00
|
|
|
---
|
2023-12-06 15:19:27 +01:00
|
|
|
- name: Changing permission
|
2024-03-13 09:51:16 +01:00
|
|
|
ansible.builtin.shell: 'chown -R root. /share/docker_data/'
|
2023-12-06 15:19:27 +01:00
|
|
|
become: true
|
2024-11-15 15:39:07 +01:00
|
|
|
vars:
|
|
|
|
selected_containers: "{{ selected_containers|replace('homeassistant' ,'ha') }}"
|
2024-11-14 12:22:52 +01:00
|
|
|
- debug:
|
2024-11-14 16:40:51 +01:00
|
|
|
msg: rsync -avh --delete /share/docker_data/{{ '{' }}{{ selected_containers }}{{ '}' }} root@{{ destination_server }}:/share/docker_data/ --exclude="home-assistant.log*" --exclude="gitlab/logs/*"
|
2024-11-15 14:01:26 +01:00
|
|
|
when: selected_containers|split(",")|length > 1
|
2024-11-15 13:28:22 +01:00
|
|
|
- debug:
|
|
|
|
msg: rsync -avh --delete /share/docker_data/{{ selected_containers }} root@{{ destination_server }}:/share/docker_data/ --exclude="home-assistant.log*" --exclude="gitlab/logs/*"
|
2024-11-15 14:01:26 +01:00
|
|
|
when: selected_containers|split(",")|length == 1
|
2024-11-14 12:50:43 +01:00
|
|
|
|
2023-12-06 15:19:27 +01:00
|
|
|
- name: Syncing all
|
2024-11-15 17:05:50 +01:00
|
|
|
<<<<<<< HEAD
|
2023-12-09 20:53:51 +01:00
|
|
|
ansible.builtin.shell: 'rsync -avh --delete /share/docker_data/{mailu2,ha,gitlab,semaphore,webhub,nginx,heimdall} admin@192.168.77.238:/share/docker_data/ --exclude="home-assistant.log*" --exclude="gitlab/logs/*"'
|
|
|
|
#ansible.builtin.shell: 'rsync -avh --delete /share/docker_data/{mailu2,webhub,nginx,heimdall} admin@192.168.77.238:/share/docker_data/ --exclude="home-assistant.log*" --exclude="gitlab/logs/*"'
|
2024-11-15 17:05:50 +01:00
|
|
|
=======
|
2024-11-14 12:50:43 +01:00
|
|
|
ansible.builtin.shell: rsync -avh --delete /share/docker_data/{{ '{' }}{{ selected_containers }}{{ '{' }} root@{{ destination_server }}:/share/docker_data/ --exclude="home-assistant.log*" --exclude="gitlab/logs/*"
|
2024-03-13 09:51:16 +01:00
|
|
|
#ansible.builtin.shell: 'rsync -avh --delete /share/docker_data/{mailu2,webhub,nginx,heimdall} root@192.168.77.238:/share/docker_data/ --exclude="home-assistant.log*" --exclude="gitlab/logs/*"'
|
2024-11-15 17:05:50 +01:00
|
|
|
>>>>>>> a2272a39029fa97337f187f1b490913cd8adbd24
|
2023-12-06 15:19:27 +01:00
|
|
|
#ansible.builtin.shell: 'ls -la'
|
2024-11-15 14:01:26 +01:00
|
|
|
when: selected_containers|split(",")|length > 1
|
2024-11-15 13:34:19 +01:00
|
|
|
- name: Syncing all
|
|
|
|
ansible.builtin.shell: rsync -avh --delete /share/docker_data/{{ selected_containers }} root@{{ destination_server }}:/share/docker_data/ --exclude="home-assistant.log*" --exclude="gitlab/logs/*"
|
|
|
|
#ansible.builtin.shell: 'rsync -avh --delete /share/docker_data/{mailu2,webhub,nginx,heimdall} root@192.168.77.238:/share/docker_data/ --exclude="home-assistant.log*" --exclude="gitlab/logs/*"'
|
|
|
|
#ansible.builtin.shell: 'ls -la'
|
2024-11-15 14:01:26 +01:00
|
|
|
when: selected_containers|split(",")|length == 1
|