Commit 538edab3 by Fred Smith

make cluster members configurable via ansible hosts or vars

parent b3d7a40c
...@@ -33,14 +33,9 @@ script.disable_dynamic: true ...@@ -33,14 +33,9 @@ script.disable_dynamic: true
# to perform discovery when new nodes (master or data) are started: # to perform discovery when new nodes (master or data) are started:
# #
# discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"] # discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"]
{%- if ELASTICSEARCH_CLUSTERED -%} {%- if ELASTICSEARCH_CLUSTER_MEMBERS|length > 1 -%}
{%- set hosts= [] -%}
{%- for host in hostvars.keys() -%} discovery.zen.ping.unicast.hosts: ['{{ELASTICSEARCH_CLUSTER_MEMBERS|join("\',\'") }}']
{% do hosts.append(host) %}
{%- endfor %}
discovery.zen.ping.unicast.hosts: ['{{hosts|join("\',\'") }}']
{% endif -%} {% 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