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]
|
## [Unreleased]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
* elasticsearch: tmpdir configuration compatible with 5.x also
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,19 @@
|
||||||
tags:
|
tags:
|
||||||
- elasticsearch
|
- 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:
|
lineinfile:
|
||||||
dest: /etc/default/elasticsearch
|
dest: /etc/default/elasticsearch
|
||||||
line: "ES_TMPDIR={{ elasticsearch_custom_tmpdir or elasticsearch_default_tmpdir | mandatory }}"
|
line: "ES_TMPDIR={{ elasticsearch_custom_tmpdir or elasticsearch_default_tmpdir | mandatory }}"
|
||||||
|
@ -28,8 +40,9 @@
|
||||||
- restart elasticsearch
|
- restart elasticsearch
|
||||||
tags:
|
tags:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
|
when: elastic_stack_version | version_compare('6', '>=')
|
||||||
|
|
||||||
- name: change JVM tmpdir
|
- name: change JVM tmpdir (>= 6.x)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/elasticsearch/jvm.options
|
dest: /etc/elasticsearch/jvm.options
|
||||||
line: "-Djava.io.tmpdir=${ES_TMPDIR}"
|
line: "-Djava.io.tmpdir=${ES_TMPDIR}"
|
||||||
|
@ -39,4 +52,5 @@
|
||||||
- restart elasticsearch
|
- restart elasticsearch
|
||||||
tags:
|
tags:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
|
when: elastic_stack_version | version_compare('6', '>=')
|
||||||
when: (elasticsearch_custom_tmpdir != '' and elasticsearch_custom_tmpdir != None) or fstab_tmp_noexec | success
|
when: (elasticsearch_custom_tmpdir != '' and elasticsearch_custom_tmpdir != None) or fstab_tmp_noexec | success
|
||||||
|
|
Loading…
Reference in a new issue