From b6fc945c19634b6e2908fbae19f159f488917bb3 Mon Sep 17 00:00:00 2001 From: jaydee Date: Fri, 15 Nov 2024 13:34:19 +0100 Subject: [PATCH] bitwarden --- playbooks/sync_container_data.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/playbooks/sync_container_data.yaml b/playbooks/sync_container_data.yaml index 5a4ca30..2e5bb83 100644 --- a/playbooks/sync_container_data.yaml +++ b/playbooks/sync_container_data.yaml @@ -14,4 +14,9 @@ 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' - when: inventory_hostname == source_server \ No newline at end of file + when: inventory_hostname == source_server and selected_containers|split(",")|length > 1 +- 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' + when: inventory_hostname == source_server and selected_containers|split(",")|length == 1 \ No newline at end of file