Hi Kai,

Thank you for quick response, will try advised and update you.

Thanks,
Abdul

On Sunday, November 5, 2017 at 1:28:26 AM UTC+5:30, Kai Stian Olstad wrote:
>
> On 04. nov. 2017 20:40, abdul sattar Shaikh wrote: 
> > I am having below playbooks, I intent to include variables and I have 
> got 
> > below message as "OK" and "changed" but file not copied over. 
> > 
> > please review and advise. 
> > 
> > Main playbook: 
> > cat fetchfile.yml 
> > --- 
> >    - hosts: all 
> >      tasks: 
> >        - name: Include vars of vars.yml into the 'dest' variable. 
> >          include_vars: 
> >            file: vars.yml 
> >            name: dest 
> >        - fetch: 
> >            src: /tmp/xyz.txt 
> >            dest: "{{ dest }}/" 
> >            flat: yes 
> > 
> > ------------ variable playbook: 
> > cat variable.yml 
> > dest: /u01/app 
> > 
>
> <snip /> 
>
> > 
> > ------------------ it shows above as changed but when I am checking 
> xyz.txt 
> > file at "dest" location, I could not see it, please advise. 
>
> You are looking at the wrong destination. 
> Look in the directory you run ansible-playbook, you will find a directory 
> starting with { 
> If you run ansible-playbook with -vvv you'll see what I mean. 
>
> The name on the include_vars means, put the content in the file under the 
> variable dest, so you dest is actually: 
> dest: 
>   dest: /u01/app 
>
> It you add 
>   - debug: var=dest 
> after include_vars you will also see that. 
>
>
> -- 
> Kai Stian Olstad 
>

-- 
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/cb8dcfeb-9e1d-421b-b7c8-3544d422e3eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to