Commit 538edab3 by Fred Smith

make cluster members configurable via ansible hosts or vars

parent b3d7a40c
......@@ -33,14 +33,9 @@ script.disable_dynamic: true
# to perform discovery when new nodes (master or data) are started:
#
# discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"]
{%- if ELASTICSEARCH_CLUSTERED -%}
{%- set hosts= [] -%}
{%- if ELASTICSEARCH_CLUSTER_MEMBERS|length > 1 -%}
{%- for host in hostvars.keys() -%}
{% do hosts.append(host) %}
{%- endfor %}
discovery.zen.ping.unicast.hosts: ['{{hosts|join("\',\'") }}']
discovery.zen.ping.unicast.hosts: ['{{ELASTICSEARCH_CLUSTER_MEMBERS|join("\',\'") }}']
{% endif -%}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment