We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b920d29 + 02aa2c6 commit 322978fCopy full SHA for 322978f
roles/elasticsearch/templates/elasticsearch.yml.j2
@@ -2,9 +2,11 @@ node.name: "{{ ansible_hostname }}"
2
path.data: {{ elasticsearch_datapath }}
3
path.logs: /var/log/elasticsearch
4
network.host: ["_local_","_site_"]
5
+{% if elastic_release < 8 or groups['elasticsearch'] | length > 1 %}
6
discovery.seed_hosts: [ {% for host in groups['elasticsearch'] %}
7
"{{ hostvars[host].ansible_default_ipv4.address | default(hostvars[host].ansible_all_ipv4_addresses[0]) }}"{% if not loop.last %},{% endif %}
8
{% endfor %} ]
9
+{% endif %}
10
cluster.initial_master_nodes: [ {% for host in groups['elasticsearch'] %}
11
"{{ hostvars[host].ansible_hostname }}"{% if not loop.last %},{% endif %}
12
0 commit comments