I have some files under my role path dir :
ls roles/my-role/files/
file1 file2 file3
I can display the content of the file by running :
- name: display contents
debug:
msg: "{{ item }}"
with_file:
- "roles/my-role/files/file1"
if in the last line I try something like :
with_file:
- "roles/my-role/files/*"
I get an error :
fatal: [localhost]: FAILED! => {"msg": "could not locate file in lookup:
roles/my-role/files/*"}
Is there a way I can iterate inside the files directory and get the content
?
PS: I need the files content and note a list of the file names.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/affa4b05-64db-4131-b0c6-e6f719de9921%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.