elasticsearch: ES_TMPDIR variable for custom tmpdir

This commit is contained in:
Jérémy Lecour 2018-02-07 17:36:04 +01:00 committed by Jérémy Lecour
parent f9c06f3e47
commit 23062e7b18
2 changed files with 15 additions and 1 deletions

View File

@ -13,6 +13,9 @@ The **patch** part changes incrmentally at each release.
### Added
* postfix: add lines in /etc/.gitignore
### Changed
* elasticsearch: use ES_TMPDIR variable for custom tmpdir, (from `/etc/default/elasticsearch` instead of changing `/etc/elesticsearch/jvm.options`).
## [9.1.6] - 2018-02-02
### Added

View File

@ -18,10 +18,21 @@
tags:
- elasticsearch
- name: check if ES_TMPDIR is available
lineinfile:
dest: /etc/default/elasticsearch
line: "ES_TMPDIR={{ elasticsearch_custom_tmpdir or elasticsearch_default_tmpdir | mandatory }}"
regexp: "^ES_TMPDIR="
insertafter: "JAVA_HOME"
notify:
- restart elasticsearch
tags:
- elasticsearch
- name: change JVM tmpdir
lineinfile:
dest: /etc/elasticsearch/jvm.options
line: "-Djava.io.tmpdir={{ elasticsearch_custom_tmpdir or elasticsearch_default_tmpdir | mandatory }}"
line: "-Djava.io.tmpdir=${ES_TMPDIR}"
regexp: "^-Djava.io.tmpdir="
insertafter: "## JVM configuration"
notify: