diff --git a/playbooks/sync_all_test.yaml b/playbooks/sync_all_test.yaml index ad35031..60d3962 100644 --- a/playbooks/sync_all_test.yaml +++ b/playbooks/sync_all_test.yaml @@ -3,14 +3,17 @@ hosts: containers gather_facts: false vars: - listjojocomma: "{{ selected_containers | split(',') }}" + listjojocomma: "{{ selected_containers | replace('[', '')| replace(']','')|[split(',') }}" tasks: - debug: msg: "{{ listjojocomma }}" + when: inventory_hostname in groups['morefine-server'] - debug: msg: "{{ item }}" loop: "{{ listjojocomma }}" + when: inventory_hostname in groups['morefine-server'] - debug: msg: "{{ item }}" - loop: "{{ selected_host }}" \ No newline at end of file + loop: "{{ selected_host }}" + when: inventory_hostname in groups['morefine-server'] \ No newline at end of file