my inventory file is like below with more additional group_vars and 
host_vars that I havent mentioned here for simplicity:
 I dont want to use host_vars as of now.

[qa]
host1 var1='["hi" , "xy"]' var2=[435345, 3425634]
host1 var2='["asd" , "er"]' var2=[212, 456]
host1 var3='["zxc" , "ghhj"]' var2=[567, 80]
host1 var4='["hi" , "hhj"]' var2=[435, 980]

Im trying to create a yml file out of this via jinja2

{{% for host in groups['qa'] %}}
host: {{ host }}
params:
{{% for i,j in zip(var1,var2) %}} --> Im not sure how to achieve something 
like this in jinja2. Can someone please guide?
     app: {{ i }
     port: {{ j }}




-- 
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/7198676d-a907-4b81-af69-85a75628cafa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to