worked like a charm , thank you so much Kai Stian !
On Thu, Dec 6, 2018 at 4:00 AM Kai Stian Olstad <
[email protected]> wrote:
> On 06.12.2018 08:12, Nicolas G wrote:
> > 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/*"
> >
>
> You need to use the fileglob, so something like this
>
> - debug: msg="{{ lookup('file', item) }}"
> with_fileglob: roles/my-role/files/*
>
> --
> Kai Stian Olstad
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/takAhjge3MA/unsubscribe.
> To unsubscribe from this group and all its topics, 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/0c42dbb2fbffd2b8e293c6e8051203cf%40olstad.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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/CALpo6LUuHkqTcynfsE%2BOsqf%2BnLq27xmBfxR8-SxV9QbN5ELRDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.