elasticsearch_heap is meant as a string (heap size in GB) in this role, but the when: elasticsearch_heap | bool condition of the Set jvm heap size task in roles/elasticsearch/tasks/main.yml treats it as a boolean. This only works when elasticsearch_heap is 1, or false (to disable): any value >= 2 is interpreted as false, so the task is skipped and the heap is not set.
Solution: introduce a new variable elasticsearch_manage_heap to control whether the heap is managed by the role or by Elasticsearch/the JVM itself. When true, the value of elasticsearch_heap is used.
Relates to #396.
elasticsearch_heapis meant as a string (heap size in GB) in this role, but thewhen: elasticsearch_heap | boolcondition of the Set jvm heap size task inroles/elasticsearch/tasks/main.ymltreats it as a boolean. This only works whenelasticsearch_heapis1, orfalse(to disable): any value>= 2is interpreted asfalse, so the task is skipped and the heap is not set.Solution: introduce a new variable
elasticsearch_manage_heapto control whether the heap is managed by the role or by Elasticsearch/the JVM itself. Whentrue, the value ofelasticsearch_heapis used.Relates to #396.