Ensure elasticsearch is always started
Ensure that elasticsearch is started/running even if non of the handlers are called. Previously, if the host was provisioned correctly, but elasticsearch was not running the role would not attempt to start it. This can happen if elasticsearch was killed, or if the previous ansible run failed prior to running the handlers.
This commit is contained in:
parent
8002829bbe
commit
9197f2fbcd
1 changed files with 3 additions and 0 deletions
|
|
@ -44,6 +44,9 @@
|
||||||
|
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
|
- name: Make sure elasticsearch is started
|
||||||
|
service: name={{instance_init_script | basename}} state=started enabled=yes
|
||||||
|
|
||||||
- name: Wait for elasticsearch to startup
|
- name: Wait for elasticsearch to startup
|
||||||
wait_for: host={{es_api_host}} port={{es_api_port}} delay=5 connect_timeout=1
|
wait_for: host={{es_api_host}} port={{es_api_port}} delay=5 connect_timeout=1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue