with_fileglob runs locally, not on the remote target machine. To get a list of files matching a pattern on a remote machine you would need to use something like the command module and ls, and register the results to a variable for later use.
On Thursday, April 30, 2015, Rodrigo B Brasil <[email protected]> wrote: > Hello! > > I'm pretty new to Ansible, so this may be a stupid thing that I'm (not) > doing, but I couldn't find the error by myself. > > When I try to use this loop, the gzip file cannot be found and I get the > "skipping" message. > > - unarchive: copy=no src={{ item }} dest=/opt/ > with_fileglob: > - /mnt/cd/VMwareTools*.tar.gz > > When I put the absolute path to the gzip file within the unarchive module, > it works fine: > > - unarchive: copy=no src=/mnt/cd/VMwareTools-8.6.0-425873.tar.gz dest= > /opt/ > > I also tried the /mnt/cd/*.tar.gz and /mnt/cd/* without success. > > > I'm running: Ansible 1.9.0.1, local host Fedora 21, remote host CentOS > 6.6. Thanks! > > -- > 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] > <javascript:_e(%7B%7D,'cvml','ansible-project%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/819c2579-6e31-4598-b660-2b20b4279b8d%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/819c2579-6e31-4598-b660-2b20b4279b8d%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Matt Martz @sivel sivel.net -- 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/CAD8N0v_zCVStMdG5J_tAD1iaOXbrQm9HUgG1Kb9inF2DO0%2Bf_w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
