Hello Ansible Experts,
I am creating a Role, which has a task to download multiple files from an URL, and, for that, I am using get_url module. Since, get_url cant download files recursively, I have been trying to use ‘with_items’.
Role Snippets Below.
/defaults/main.yml `
Try
files: "{{ lookup('vars', dir ~ '_files' }}"
V/r, James Cassell
Thanks very much James for your advise. Was able to achieve what was intended, but there seems to be another problem.
Updated the code as below, and, Ansible is passing the list of items to the get_url.
`
with_items: "{{ lookup('vars', dir ~'_files') }}"