Thanks a lot Brian. It worked. :)

On Wednesday, 17 December 2014 18:49:15 UTC+5, Brian Coca wrote:
>
> add_host allows you to add per host facts 
>
> - add_host: name={{ item.hostIP }} copyfile={{ item.filename }} 
>
> - copy: src={{copyfile}} ... 
>
> On Wed, Dec 17, 2014 at 3:18 AM, Fazal-e-Rehman Khan 
> <[email protected] <javascript:>> wrote: 
> > I have a yml file for variables which goes like this. 
> > 
> > - newHosts 
> >    - hostIP: 192.168.1.22 
> >      filename: file1 
> >    - hostIP: 192.168.1.23 
> >      filename: file2 
> > 
> > I am using add_host: {{ item.hostIP }} with_items {{ newHosts }} to add 
> > hosts on the runtime. 
> > 
> > I want to copy respective file to respective hosts with something like 
> {{ 
> > item.filename }} but it copies all files to each host. How I just copy 
> only 
> > the corresponding file to the node. How can I do that? 
> > 
> > Sorry Im a noob. But need an urgent help. 
> > 
> > 
> > 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:>. 
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/ansible-project/5f423b66-2150-49e0-b780-876615a0d243%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> Brian Coca 
>

-- 
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/ef14eed7-22cf-43d5-9802-94c8da564481%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to