I have following host group 

[zookeeper]
zk001.abc.cc zookeeper_myid=1
zk002.abc.cc zookeeper_myid=2
zk003.abc.cc zookeeper_myid=3 


I want following to be created when playbook run

zookeeper.connect=zk001.abc.cc: 2181,zk002.abc.cc: 2181,zk003.abc.cc:2181


I tried following in a template which worked 

zookeeper.connect={{ groups['zookeeper']|join(':2181,') }}:2181

but now I want to use *zookeeper_port* var instead of *2181*, so I tried 
following but it didn't worked.

zookeeper.connect={{ groups['zookeeper' ]|join(':{{ zookeeper_port }},') 
}}:{{ zookeeper_port }}


Any idea how to do this good way

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].
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/d06101b5-0b26-4ab4-a30b-a2abbe76890f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to