From 573e977eb00fb5a3249b20a0f84406babfd2c4ba Mon Sep 17 00:00:00 2001 From: jaydee Date: Wed, 6 Dec 2023 08:37:34 +0100 Subject: [PATCH] 111 --- playbooks/sync_all.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 playbooks/sync_all.yaml diff --git a/playbooks/sync_all.yaml b/playbooks/sync_all.yaml new file mode 100644 index 0000000..3e222d8 --- /dev/null +++ b/playbooks/sync_all.yaml @@ -0,0 +1,11 @@ +- hosts: containers + name: Sync mailu,ha,... + ignore_unreachable: false + tasks: + - name: Changing permission + ansible.builtin.shell: 'chown -R admin. /share/docker_data/' + become: true + when: inventory_hostname in groups['raspberry'] or inventory_hostname in groups['raspberrypi5'] + - name: Syncing all + ansible.builtin.shell: 'rsync -ra /share/docker_data/{mailu2,ha,gitlab,semaphore,webhub,nginx} admin@192.168.77.238:/share/docker_data/' + when: inventory_hostname in groups['nas'] \ No newline at end of file