forked from evolix/ansible-roles
elasticsearch: configure cluster with seed hosts and initial masters
This commit is contained in:
parent
f2f63eee36
commit
43122a5ea9
|
@ -31,6 +31,7 @@ The **patch** part changes incrementally at each release.
|
|||
|
||||
* certbot: install certbot dependencies non-interactively for jessie
|
||||
* elasticsearch: set tmpdir before datadir
|
||||
* elasticsearch: configure cluster with seed hosts and initial masters
|
||||
* evoacme: upstream release 20.06.1
|
||||
* evoacme: read values from environment before defaults file
|
||||
* haproxy: deport SSL tuning to Mozilla SSL generator
|
||||
|
|
|
@ -5,9 +5,12 @@ elasticsearch_cluster_name: Null
|
|||
elasticsearch_cluster_members: Null
|
||||
elasticsearch_minimum_master_nodes: Null
|
||||
elasticsearch_node_name: "${HOSTNAME}"
|
||||
elasticsearch_network_host: "[_local_]"
|
||||
elasticsearch_network_host:
|
||||
- "_local_"
|
||||
elasticsearch_network_publish_host: Null
|
||||
elasticsearch_http_publish_host: Null
|
||||
elasticsearch_discovery_seed_hosts: Null
|
||||
elasticsearch_cluster_initial_master_nodes: Null
|
||||
elasticsearch_custom_datadir: Null
|
||||
elasticsearch_custom_tmpdir: Null
|
||||
elasticsearch_default_tmpdir: /var/lib/elasticsearch/tmp
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
- name: Configure network host
|
||||
lineinfile:
|
||||
dest: /etc/elasticsearch/elasticsearch.yml
|
||||
line: "network.host: {{ elasticsearch_network_host }}"
|
||||
line: "network.host: {{ elasticsearch_network_host | to_yaml }}"
|
||||
regexp: "^network.host:"
|
||||
insertafter: "^# *network.host:"
|
||||
when: elasticsearch_network_host|default("", True)
|
||||
|
@ -32,7 +32,7 @@
|
|||
- name: Configure network publish_host
|
||||
lineinfile:
|
||||
dest: /etc/elasticsearch/elasticsearch.yml
|
||||
line: "network.publish_host: {{ elasticsearch_network_publish_host }}"
|
||||
line: "network.publish_host: {{ elasticsearch_network_publish_host | to_yaml }}"
|
||||
regexp: "^network.publish_host:"
|
||||
insertafter: "^network.host:"
|
||||
when: elasticsearch_network_publish_host|default("", True)
|
||||
|
@ -42,13 +42,31 @@
|
|||
- name: Configure http publish_host
|
||||
lineinfile:
|
||||
dest: /etc/elasticsearch/elasticsearch.yml
|
||||
line: "http.publish_host: {{ elasticsearch_http_publish_host }}"
|
||||
line: "http.publish_host: {{ elasticsearch_http_publish_host | to_yaml }}"
|
||||
regexp: "^http.publish_host:"
|
||||
insertafter: "^http.port:"
|
||||
when: elasticsearch_http_publish_host|default("", True)
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: Configure discovery seed hosts
|
||||
lineinfile:
|
||||
dest: /etc/elasticsearch/elasticsearch.yml
|
||||
line: "discovery.seed_hosts: {{ elasticsearch_discovery_seed_hosts | to_yaml }}"
|
||||
regexp: "^discovery.seed_hosts:"
|
||||
when: elasticsearch_discovery_seed_hosts
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: Configure initial master nodes
|
||||
lineinfile:
|
||||
dest: /etc/elasticsearch/elasticsearch.yml
|
||||
line: "cluster.initial_master_nodes: {{ elasticsearch_cluster_initial_master_nodes | to_yaml }}"
|
||||
regexp: "^cluster.initial_master_nodes:"
|
||||
when: elasticsearch_cluster_initial_master_nodes
|
||||
tags:
|
||||
- config
|
||||
|
||||
- name: Configure RESTART_ON_UPGRADE
|
||||
lineinfile:
|
||||
dest: /etc/default/elasticsearch
|
||||
|
@ -93,5 +111,3 @@
|
|||
when: elasticsearch_minimum_master_nodes|default("", True)
|
||||
tags:
|
||||
- config
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue