diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-10-20 15:10:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-20 15:10:49 -0400 |
commit | 495909e50146217adcca32e7c051f4f90dd39bf7 (patch) | |
tree | b05f4aa1f84fdf9cd4117ffb43be007b36e372f3 /roles/openshift_logging_elasticsearch | |
parent | 4e79d8e33413ba94d951ba5958b7481c3addf96e (diff) | |
parent | 46551d58d286fe18bb5637be2b9a21a928f05632 (diff) | |
download | openshift-495909e50146217adcca32e7c051f4f90dd39bf7.tar.gz openshift-495909e50146217adcca32e7c051f4f90dd39bf7.tar.bz2 openshift-495909e50146217adcca32e7c051f4f90dd39bf7.tar.xz openshift-495909e50146217adcca32e7c051f4f90dd39bf7.zip |
Merge pull request #5766 from jcantrill/1489498_preserve_replica_count
bug 1489498. preserve replica and shard settings
Diffstat (limited to 'roles/openshift_logging_elasticsearch')
-rw-r--r-- | roles/openshift_logging_elasticsearch/tasks/main.yaml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roles/openshift_logging_elasticsearch/tasks/main.yaml b/roles/openshift_logging_elasticsearch/tasks/main.yaml index aeff2d198..44f6b00f3 100644 --- a/roles/openshift_logging_elasticsearch/tasks/main.yaml +++ b/roles/openshift_logging_elasticsearch/tasks/main.yaml @@ -164,13 +164,17 @@ when: es_logging_contents is undefined changed_when: no +- set_fact: + __es_num_of_shards: "{{ _es_configmap | default({}) | walk('index.number_of_shards', '1') }}" + __es_num_of_replicas: "{{ _es_configmap | default({}) | walk('index.number_of_replicas', '0') }}" + - template: src: elasticsearch.yml.j2 dest: "{{ tempdir }}/elasticsearch.yml" vars: allow_cluster_reader: "{{ openshift_logging_elasticsearch_ops_allow_cluster_reader | lower | default('false') }}" - es_number_of_shards: "{{ openshift_logging_es_number_of_shards | default(1) }}" - es_number_of_replicas: "{{ openshift_logging_es_number_of_replicas | default(0) }}" + es_number_of_shards: "{{ openshift_logging_es_number_of_shards | default(None) or __es_num_of_shards }}" + es_number_of_replicas: "{{ openshift_logging_es_number_of_replicas | default(None) or __es_num_of_replicas }}" es_kibana_index_mode: "{{ openshift_logging_elasticsearch_kibana_index_mode | default('unique') }}" when: es_config_contents is undefined |