vars/ file with defined variable as list
file_id:
- test1
- test2
- test3
- test4
Main task that includes series of tasks from generate_files.yml
- name: generate files
include: generate_files.yml
vars:
file_id_loop: "{{ item }}"
with_items:
- "{{ file_id }}"