2015-11-26 17:26:28 +00:00
|
|
|
|
|
|
|
|
{% if es_config %}
|
2015-11-25 15:28:09 +00:00
|
|
|
{{ es_config | to_nice_yaml }}
|
2015-11-26 17:26:28 +00:00
|
|
|
{% endif %}
|
2015-10-22 19:09:53 +01:00
|
|
|
|
2015-11-25 15:28:09 +00:00
|
|
|
{% if es_config['cluster.name'] is not defined %}
|
|
|
|
|
cluster.name: elasticsearch
|
2015-10-22 19:09:53 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
2015-11-25 15:28:09 +00:00
|
|
|
{% if es_config['node.name'] is not defined %}
|
|
|
|
|
node.name: {{inventory_hostname}}-{{es_instance_name}}
|
2015-10-22 19:09:53 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
#################################### Paths ####################################
|
|
|
|
|
|
|
|
|
|
# Path to directory containing configuration (this file and logging.yml):
|
2018-01-08 16:59:44 -08:00
|
|
|
|
|
|
|
|
{% if (es_version | version_compare('6.0.0', '<')) %}
|
2015-12-13 22:46:50 +00:00
|
|
|
path.conf: {{ conf_dir }}
|
2018-01-08 16:59:44 -08:00
|
|
|
{% endif %}
|
2015-10-22 19:09:53 +01:00
|
|
|
|
2016-03-18 19:30:11 +00:00
|
|
|
path.data: {{ data_dirs | array_to_str }}
|
2015-10-22 19:09:53 +01:00
|
|
|
|
2016-11-04 16:04:31 +01:00
|
|
|
path.logs: {{ log_dir }}
|
2017-01-11 13:16:07 +00:00
|
|
|
|
2018-05-03 16:45:04 +02:00
|
|
|
{% if es_path_repo is defined %}
|
2018-04-26 15:01:18 +02:00
|
|
|
path.repo: {{ es_path_repo }}
|
|
|
|
|
{% endif %}
|
2018-04-24 12:51:03 +02:00
|
|
|
|
2018-05-03 16:29:17 +02:00
|
|
|
{% if es_action_auto_create_index == true %}
|
|
|
|
|
action.auto_create_index: true
|
|
|
|
|
{% elif not es_action_auto_create_index %}
|
|
|
|
|
action.auto_create_index: false
|
|
|
|
|
{% else %}
|
2018-05-03 16:45:04 +02:00
|
|
|
action.auto_create_index: {{ es_action_auto_create_index }}
|
2018-05-03 16:29:17 +02:00
|
|
|
{% endif %}
|
2018-04-24 12:51:03 +02:00
|
|
|
|
2018-02-16 09:07:05 +01:00
|
|
|
{% if es_enable_xpack %}
|
2017-01-11 13:16:07 +00:00
|
|
|
{% if not "security" in es_xpack_features %}
|
|
|
|
|
xpack.security.enabled: false
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% if not "monitoring" in es_xpack_features %}
|
|
|
|
|
xpack.monitoring.enabled: false
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% if not "alerting" in es_xpack_features %}
|
|
|
|
|
xpack.watcher.enabled: false
|
2017-06-26 11:25:14 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% if not "ml" in es_xpack_features %}
|
|
|
|
|
xpack.ml.enabled: false
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% if not "graph" in es_xpack_features %}
|
|
|
|
|
xpack.graph.enabled: false
|
|
|
|
|
{% endif %}
|
2018-02-16 09:07:05 +01:00
|
|
|
{% endif %}
|
2018-04-24 12:51:03 +02:00
|
|
|
|
2018-05-05 07:56:16 +02:00
|
|
|
{% if es_ssl_config['enabled'] is defined %}
|
2018-05-03 16:45:04 +02:00
|
|
|
xpack.security.transport.ssl.enabled: true
|
|
|
|
|
xpack.security.http.ssl.enabled: true
|
2018-05-05 07:56:16 +02:00
|
|
|
xpack.security.http.ssl.keystore.path: {{conf_dir}}/ssl/{{es_ssl_config['dns']}}.p12
|
2018-05-03 16:45:04 +02:00
|
|
|
#Legacy config required for /usr/share/elasticsearch/bin/x-pack/setup-passwords
|
2018-05-05 07:56:16 +02:00
|
|
|
xpack.security.http.ssl.keystore.password: "test"
|
|
|
|
|
xpack.security.http.ssl.truststore.path: {{conf_dir}}/ssl/{{es_ssl_config['dns']}}.p12
|
2018-05-03 16:45:04 +02:00
|
|
|
#Legacy config required for /usr/share/elasticsearch/bin/x-pack/setup-passwords
|
2018-05-05 07:56:16 +02:00
|
|
|
xpack.security.http.ssl.truststore.password: "test"
|
|
|
|
|
xpack.security.http.ssl.client_authentication: none
|
2018-05-03 16:45:04 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
2018-05-05 07:56:16 +02:00
|
|
|
{% if es_mail_config['account'] is defined %}
|
2018-04-24 12:51:03 +02:00
|
|
|
xpack.notification.email:
|
|
|
|
|
account:
|
|
|
|
|
{{ es_mail_config['account'] }}:
|
|
|
|
|
profile: {{ es_mail_config['profile'] }}
|
|
|
|
|
email_defaults:
|
|
|
|
|
from: {{ es_mail_config['from'] }}
|
|
|
|
|
smtp:
|
|
|
|
|
auth: {{ es_mail_config['require_auth'] }}
|
|
|
|
|
host: {{ es_mail_config['host'] }}
|
|
|
|
|
port: {{ es_mail_config['port'] }}
|
2018-04-26 15:01:18 +02:00
|
|
|
{% if es_mail_config['require_auth'] == true %}
|
2018-04-24 12:51:03 +02:00
|
|
|
user: {{ es_mail_config['user'] }}
|
|
|
|
|
password: {{ es_mail_config['pass'] }}
|
2018-05-05 07:56:16 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
2018-05-03 06:37:50 +02:00
|
|
|
{% endif %}
|