forked from ISTI-ansible-roles/ansible-roles
library/roles/ELK/elasticsearch: Make the configuration files valid for both elasticsearch 2.x and 5.x.
This commit is contained in:
parent
9dd0afa884
commit
3a31d15cca
|
@ -1,8 +1,9 @@
|
||||||
---
|
---
|
||||||
elasticsearch_repo_key: https://packages.elastic.co/GPG-KEY-elasticsearch
|
elasticsearch_repo_key: https://packages.elastic.co/GPG-KEY-elasticsearch
|
||||||
elasticsearch_repo_version: 2.x
|
elasticsearch_major_version: 2
|
||||||
|
elasticsearch_repo_version: '{{ elasticsearch_major_version }}.x'
|
||||||
elasticsearch_repo: 'deb http://packages.elastic.co/elasticsearch/{{ elasticsearch_repo_version }}/debian stable main'
|
elasticsearch_repo: 'deb http://packages.elastic.co/elasticsearch/{{ elasticsearch_repo_version }}/debian stable main'
|
||||||
#elasticsearch_repo_version: 5.x
|
#elasticsearch_major_version: 5
|
||||||
#elasticsearch_repo: 'deb https://artifacts.elastic.co/packages/{{ elasticsearch_repo_version }}/apt stable main'
|
#elasticsearch_repo: 'deb https://artifacts.elastic.co/packages/{{ elasticsearch_repo_version }}/apt stable main'
|
||||||
elasticsearch_packages:
|
elasticsearch_packages:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
|
|
|
@ -17,6 +17,7 @@ LOG_DIR={{ elasticsearch_log_dir }}
|
||||||
# Elasticsearch PID directory
|
# Elasticsearch PID directory
|
||||||
#PID_DIR=/var/run/elasticsearch
|
#PID_DIR=/var/run/elasticsearch
|
||||||
|
|
||||||
|
{% if elasticsearch_major_version <= 2 %}
|
||||||
# Set ES_HEAP_SIZE to 50% of available RAM, but no more than 31g
|
# Set ES_HEAP_SIZE to 50% of available RAM, but no more than 31g
|
||||||
ES_HEAP_SIZE={{ elasticsearch_heap_size }}
|
ES_HEAP_SIZE={{ elasticsearch_heap_size }}
|
||||||
# Heap new generation
|
# Heap new generation
|
||||||
|
@ -27,7 +28,7 @@ ES_HEAP_SIZE={{ elasticsearch_heap_size }}
|
||||||
|
|
||||||
# Additional Java OPTS
|
# Additional Java OPTS
|
||||||
ES_JAVA_OPTS="{{ elasticsearch_additional_java_opts }}"
|
ES_JAVA_OPTS="{{ elasticsearch_additional_java_opts }}"
|
||||||
|
{% endif %}
|
||||||
# Configure restart on package upgrade (true, every other setting will lead to not restarting)
|
# Configure restart on package upgrade (true, every other setting will lead to not restarting)
|
||||||
#ES_RESTART_ON_UPGRADE=true
|
#ES_RESTART_ON_UPGRADE=true
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ path.data: {{ elasticsearch_data_dir }}
|
||||||
#
|
#
|
||||||
path.logs: {{ elasticsearch_log_dir }}
|
path.logs: {{ elasticsearch_log_dir }}
|
||||||
#
|
#
|
||||||
|
{% if elasticsearch_major_version <= 2 %}
|
||||||
# ----------------------------------- Memory -----------------------------------
|
# ----------------------------------- Memory -----------------------------------
|
||||||
#
|
#
|
||||||
# Lock the memory on startup:
|
# Lock the memory on startup:
|
||||||
|
@ -46,6 +47,7 @@ bootstrap.mlockall: true
|
||||||
# available on the system and that the owner of the process is allowed to use this limit.
|
# available on the system and that the owner of the process is allowed to use this limit.
|
||||||
#
|
#
|
||||||
# Elasticsearch performs poorly when the system is swapping the memory.
|
# Elasticsearch performs poorly when the system is swapping the memory.
|
||||||
|
{% endif %}
|
||||||
#
|
#
|
||||||
# ---------------------------------- Network -----------------------------------
|
# ---------------------------------- Network -----------------------------------
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue