diff --git a/templates/zoo.cfg.j2 b/templates/zoo.cfg.j2 index 779deb5..c94dc8c 100644 --- a/templates/zoo.cfg.j2 +++ b/templates/zoo.cfg.j2 @@ -18,7 +18,7 @@ clientPort={{ zookeeper_client_port }} {% if zookeeper_cluster_members | length > 1 %} # specify all zookeeper servers {% for server in zookeeper_cluster_members %} -server.{{ loop.index }}={{ hostvars[server][zookeeper_cluster_address_hostvars_key] }}:{{ zookeeper_cluster_peer_ports }} +server.{{ loop.index }}={{ hostvars[server][zookeeper_cluster_address_hostvars_key] | ansible.utils.ipwrap }}:{{ zookeeper_cluster_peer_ports }} {% endfor %} {% endif %}