Expose Elasticsearch data path configuration

Currently the location where elasticsearch stores its data is hardcoded
in the elasticsearch.yml configuration template to /var/lib/elasticsearch.
This commit allows the option to be configured, and exposes the value as a
default variable. This not only allows the data directory to be changed,
but also for elasticsearch to be configured to use multiple data directories
through a comma separated list. The default behaviour is unchanged.

Change-Id: I21dbcaeab997362f94e245434cc5aa35136aeee9
This commit is contained in:
Duncan Martin Walker 2020-01-29 10:08:33 +00:00
parent 9dffb8c184
commit 33d3822f99
2 changed files with 2 additions and 1 deletions
elk_metrics_7x/roles/elasticsearch

@ -15,6 +15,7 @@
cluster_name: openstack_elk
elastic_log_rotate_path: "/var/log/elasticsearch"
elastic_data_path: "/var/lib/elasticsearch"
temp_dir: /var/lib/elasticsearch/tmp
nfs_query: "[?fstype=='nfs' || fstype=='nfs4']"

@ -32,7 +32,7 @@ node.ml: false
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
path.data: {{ elastic_data_path }}
#
# Path to log files:
#