2024-11-14 11:35:42 +01:00
|
|
|
---
|
|
|
|
- name: import a task
|
2024-11-14 12:33:42 +01:00
|
|
|
hosts: nas
|
2024-11-14 11:35:42 +01:00
|
|
|
gather_facts: false
|
|
|
|
tasks:
|
|
|
|
- debug:
|
2024-11-14 11:37:05 +01:00
|
|
|
msg: "{{ item }}"
|
2024-11-14 12:08:57 +01:00
|
|
|
loop: "{{ selected_containers | split(',') }}"
|
2024-11-14 11:38:45 +01:00
|
|
|
- debug:
|
2024-11-14 12:32:11 +01:00
|
|
|
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 }}"
|