Hi Stefan, Thanks for your comment, i am getting the same issue even after putting that in double quotes.
*Regards,* *Ankit* On Mon, Jun 1, 2020 at 5:30 PM Stefan Hornburg (Racke) <[email protected]> wrote: > On 6/1/20 1:49 PM, Ankit wrote: > > Hello All, > > > > I have got the following playbooks where i am trying to copy directories > and all its contents recursively which is > > present in project repo. For identifying the correct directory, i am > using a variable which holds the pattern value. For > > some reason, the task is skipped and the full verbose too doesn't give > me enough information about where it is failing. > > Can someone please suggest. > > > > | > > --- > > -hosts:all > > gather_facts:no > > become:yes > > vars: > > appid:'1554' > > tasks: > > -name:Copyeach file over that matches the given pattern > > copy: > > src:"{{ item }}" > > dest:"/tmp" > > with_fileglob: > > -/home/DS/ram/playbooks/app_dir_{{appid }}* > > > > I think you need to wrap the argument into double_quotes like that: > > with_fileglob: > - "/home/DS/ram/playbooks/app_dir_{{appid }}*" > > Otherwise it wouldn't interpolate the appid variable. > > Regards > Racke > > > | > > > > *_Output -vvvv :_* > > | > > PLAY > > > [all]************************************************************************************************************************************************** > > META:ran handlers > > > > > > TASK [Copyeach file over that matches the given > > > pattern]*************************************************************************************************** > > task path:/home/DS/ram/playbooks/copyDirLinux.yml:8 > > META:ran handlers > > META:ran handlers > > > > > > PLAY RECAP > > > ************************************************************************************************************************************************** > > host1 :ok=0 changed=0 unreachable=0 failed=0 > skipped=1 rescued=0 ignored=0 > > host2 :ok=0 changed=0 unreachable=0 failed=0 > skipped=1 rescued=0 ignored=0 > > > > > > andthe following directory IS > present:/home/DS/ram/playbooks/app_dir_1554_cca > > | > > > > > > - Regards > > > > -- > > 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] <mailto: > [email protected]>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/ansible-project/725e44d4-6342-404f-9cc6-68c3fa4f9f30%40googlegroups.com > > < > https://groups.google.com/d/msgid/ansible-project/725e44d4-6342-404f-9cc6-68c3fa4f9f30%40googlegroups.com?utm_medium=email&utm_source=footer > >. > > > -- > Ecommerce and Linux consulting + Perl and web application programming. > Debian and Sympa administration. Provisioning with Ansible. > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/fdb94a35-6c71-c11a-982f-bab62a56f5e4%40linuxia.de > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACecUhuzFTtB0R8xrtRZDvqs3XP8N9DkOLPu%2BD6fTd1y%2BRge6w%40mail.gmail.com.
