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:
janderson2 2017-05-15 15:15:17 +01:00
parent 8002829bbe
commit 9197f2fbcd

View file

@ -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