-
Notifications
You must be signed in to change notification settings - Fork 3
/
elasticsearch.yaml
42 lines (35 loc) · 1.81 KB
/
elasticsearch.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This playbook prepares the elasticsearch servers for a given inventory.
---
- hosts: elasticsearch
sudo: true
vars:
elasticsearch_version: 1.2.2
elasticsearch_plugins:
- name: mobz/elasticsearch-head
elasticsearch_discovery_zen_ping_multicast_enabled: false
elasticsearch_discovery_zen_ping_unicast_hosts: "{{ groups['elasticsearch'] }}"
elasticsearch_gateway_recover_after_nodes: "{{ groups['elasticsearch']|length }}"
elasticsearch_index_number_of_replicas: "{{ groups['elasticsearch']|length - 1 }}"
elasticsearch_number_of_replicas: "{{ groups['elasticsearch']|length - 1 }}" # This is a hack to work around a bug in the gpstathis.elasticsearch role
elasticsearch_memory_bootstrap_mlockall: true
elasticsearch_node_master: "{{ 'true' if [ansible_hostname, ansible_domain]|join('.') ==
groups['elasticsearch']|first
else 'false' }}"
elasticsearch_node_name: node-{{ ansible_hostname }}
elasticsearch_node_max_local_storage_nodes: 1
elasticsearch_slowlog_threshold_fetch_warn: 3s
elasticsearch_slowlog_threshold_query_debug: 2s
elasticsearch_slowlog_threshold_query_warn: 3s
elasticsearch_service_startonboot: yes
elasticsearch_thread_pools:
- 'threadpool.bulk.queue_size: -1'
- 'indices.fielddata.cache.size: 50%' # This is a hack and should be done somewhere else
- 'script.disable_dynamic: false' #
elasticsearch_timezone: America/Phoenix
roles:
- role: notify-chat
msg: "Updating elasticsearch"
- gpstathis.elasticsearch
- { role: elasticsearch-master, when: elasticsearch_node_master }
- role: notify-chat
msg: "Done updating elasticsearch"