Skip to content

Commit

Permalink
Fix for sleighzy#5 to provide default zookeeper_id value in the zoo.c…
Browse files Browse the repository at this point in the history
…fg configuration file if this is not provided as a host variable (sleighzy#7)
  • Loading branch information
sleighzy authored Mar 24, 2020
1 parent 9bbe55a commit d1f3e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/zoo.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ clientPort={{ zookeeper_client_port }}
#server.2=hostname2:2888:3888

{% for host in zookeeper_servers %}
server.{{ hostvars[host].zookeeper_id }}={{ hostvars[host]['ansible_nodename'] }}:{{ zookeeper_leader_port }}:{{ zookeeper_election_port }}
server.{{ hostvars[host].zookeeper_id | default(zookeeper_id) }}={{ hostvars[host]['ansible_nodename'] }}:{{ zookeeper_leader_port }}:{{ zookeeper_election_port }}
{% endfor %}

0 comments on commit d1f3e62

Please sign in to comment.