elasticsearch: fix datadir/tmpdir conditions
This commit is contained in:
parent
430f36c0e7
commit
5800159830
|
@ -7,16 +7,16 @@
|
||||||
register: elasticsearch_custom_datadir_test
|
register: elasticsearch_custom_datadir_test
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
|
|
||||||
- name: "read the real datadir"
|
- name: "read the real datadir"
|
||||||
command: readlink -f /var/lib/elasticsearch
|
command: readlink -f /var/lib/elasticsearch
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: elasticsearch_current_real_datadir_test
|
register: elasticsearch_current_real_datadir_test
|
||||||
check_mode: no
|
check_mode: no
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
when: elasticsearch_custom_datadir
|
when:
|
||||||
|
- elasticsearch_custom_datadir != ''
|
||||||
|
- elasticsearch_custom_datadir != None
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: elasticsearch is stopped
|
- name: elasticsearch is stopped
|
||||||
|
@ -41,4 +41,8 @@
|
||||||
state: started
|
state: started
|
||||||
tags:
|
tags:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
when: elasticsearch_custom_datadir and elasticsearch_custom_datadir != elasticsearch_current_real_datadir_test.stdout and not elasticsearch_custom_datadir_test.stat.exists
|
when:
|
||||||
|
- elasticsearch_custom_datadir != ''
|
||||||
|
- elasticsearch_custom_datadir != None
|
||||||
|
- elasticsearch_custom_datadir != elasticsearch_current_real_datadir_test.stdout
|
||||||
|
- not elasticsearch_custom_datadir_test.stat.exists
|
||||||
|
|
|
@ -28,4 +28,4 @@
|
||||||
- restart elasticsearch
|
- restart elasticsearch
|
||||||
tags:
|
tags:
|
||||||
- elasticsearch
|
- elasticsearch
|
||||||
when: elasticsearch_custom_tmpdir 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