diff --git a/ansible/roles/elasticsearch/defaults/main.yml b/ansible/roles/elasticsearch/defaults/main.yml index 86d5ae9ae5..9f6c4787bf 100644 --- a/ansible/roles/elasticsearch/defaults/main.yml +++ b/ansible/roles/elasticsearch/defaults/main.yml @@ -6,7 +6,7 @@ elasticsearch_services: enabled: true image: "{{ elasticsearch_image_full }}" environment: - ES_HEAP_SIZE: "{{ es_heap_size }}" + ES_JAVA_OPTS: "{{ es_java_opts }}" volumes: - "{{ node_config_directory }}/elasticsearch/:{{ container_config_directory }}/" - "/etc/localtime:/etc/localtime:ro" @@ -18,6 +18,7 @@ elasticsearch_services: #################### elasticsearch_cluster_name: "kolla_logging" es_heap_size: "1g" +es_java_opts: "{% if es_heap_size %}-Xms{{ es_heap_size }} -Xmx{{ es_heap_size }}{%endif%}" #################### # Docker