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-Rehm
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
wrote:
> I have a yml file for variables which goes like this.
>
> - newHosts
>- hostIP: 192.168.1.22
>
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 f