Hi,

I have something like this in a templates/file.j2  file (happens to be a 
kafka broker config):

----
{% set zoo_private_ips=[] %}
{% for host in groups['zookeeper-nodes'] %}
   {% do zoo_private_ips.append(hostvars[host]['private_ip_address']) %}
{% endfor %}

zookeeper.connect={{ zoo_private_ips | 
join(":{0},".format(zookeeper_client_port)) }}:{{ zookeeper_client_port }}
----



But now I want to use the value of the zookeeper.connect variable in some 
other task within tasks/main.yml.
Is there some way I can generate the zookeeper.connect value somewhere 
before the tasks run and then pass it both to the template module task 
(i.e., for config shown above) and my other new task?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to