Write a single task that verifies all the files in files_list variable exist on the host
Answer
- name: Ensure all files exist
assert:
that:
- item.stat.exists
loop: "{{ files_list }}"
- name: Ensure all files exist
assert:
that:
- item.stat.exists
loop: "{{ files_list }}"