ansible/playbooks/sync_all_test.yaml
2024-11-14 12:33:42 +01:00

18 lines
569 B
YAML

---
- name: import a task
hosts: nas
gather_facts: false
tasks:
- debug:
msg: "{{ item }}"
loop: "{{ selected_containers | split(',') }}"
- debug:
msg: "{{ destination_server }}"
- debug:
msg: "{{ source_server }}"
- debug:
msg: 'rsync -avh --delete /share/docker_data/\{{{ selected_containers }}\} root@{{ destination_server }}:/share/docker_data/ --exclude="home-assistant.log*" --exclude="gitlab/logs/*"'
when: inventory_hostname == source_server
- debug:
msg: "{{ destination_server }}"