elasticsearch: tmpdir configuration compatible with 5.x also
This commit is contained in:
parent
4f4b7cd8dc
commit
f8babfd532
|
@ -11,6 +11,7 @@ The **patch** part changes incrementally at each release.
|
|||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
* elasticsearch: tmpdir configuration compatible with 5.x also
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -18,7 +18,19 @@
|
|||
tags:
|
||||
- elasticsearch
|
||||
|
||||
- name: check if ES_TMPDIR is available
|
||||
- name: change JVM tmpdir (< 6.x)
|
||||
lineinfile:
|
||||
dest: /etc/elasticsearch/jvm.options
|
||||
line: "-Djava.io.tmpdir={{ elasticsearch_custom_tmpdir or elasticsearch_default_tmpdir | mandatory }}"
|
||||
regexp: "^-Djava.io.tmpdir="
|
||||
insertafter: "## JVM configuration"
|
||||
notify:
|
||||
- restart elasticsearch
|
||||
tags:
|
||||
- elasticsearch
|
||||
when: elastic_stack_version | version_compare('6', '<')
|
||||
|
||||
- name: check if ES_TMPDIR is available (>= 6.x)
|
||||
lineinfile:
|
||||
dest: /etc/default/elasticsearch
|
||||
line: "ES_TMPDIR={{ elasticsearch_custom_tmpdir or elasticsearch_default_tmpdir | mandatory }}"
|
||||
|
@ -28,8 +40,9 @@
|
|||
- restart elasticsearch
|
||||
tags:
|
||||
- elasticsearch
|
||||
when: elastic_stack_version | version_compare('6', '>=')
|
||||
|
||||
- name: change JVM tmpdir
|
||||
- name: change JVM tmpdir (>= 6.x)
|
||||
lineinfile:
|
||||
dest: /etc/elasticsearch/jvm.options
|
||||
line: "-Djava.io.tmpdir=${ES_TMPDIR}"
|
||||
|
@ -39,4 +52,5 @@
|
|||
- restart elasticsearch
|
||||
tags:
|
||||
- elasticsearch
|
||||
when: elastic_stack_version | version_compare('6', '>=')
|
||||
when: (elasticsearch_custom_tmpdir != '' and elasticsearch_custom_tmpdir != None) or fstab_tmp_noexec | success
|
||||
|
|
Loading…
Reference in a new issue