I mean that with every loop iteration the play with the shell script should be 
invoked with its respective details as supplied by the {{ item }}

So, if the database returns three records in "{{ command_result.stdout_lines 
}}"  the shell script play should be invoked thrice with the details of each 
record in {{ item}} respectively.

For example: The database can return any number of rows and lets consider it 
returns three rows of type: <listofhosts>\t<somearguments>:

host5,host8\targ1
host6,host2\targ3
host9,host3,host4\targ4


What I need is the loop with_items: {{ command_result.stdout_lines }} would run 
three plays and each play to build dynamic host group of the host list for that 
run and its respective argument.

So, for the first run dynamic hosts group will be host5,host8 and the shell 
should get arg1

for second loop iteration dynamic hosts group will be host6,host2 and shell 
would get arg3

and so forth.

Hope this makes my requirement understood.

Can you please suggest.

-- 
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/5b3a8bfc-412e-456a-ad52-3476e3cba1ae%40googlegroups.com.

Reply via email to