Hi Roy,
Here is what I use for a mapr drill-override template:
drill.exec: {
cluster-id: "cloud-drillbits",
zk.connect: "{% for host in groups['zookeeper'] %}{{
hostvars[host]['inventory_hostname'] }}:5181{% if not loop.last %},{%
endif %}{% endfor %}"
}
Hope this helps.
On Thu, Nov 5, 2015 at 5:23 PM, Roy <[email protected]> wrote:
> 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.
--
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/CAKsMCES665O_trrP%3Dy60qgLUcso%3DA%2B34o5K7V7PaA8N6-fHwRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.