mirror of
https://github.com/aljazceru/ansible-elasticsearch.git
synced 2025-12-18 17:44:20 +01:00
Added task to wait for es to startup. Adding templates failed sometimes if startup wasn't completed
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
- name: Copy templates to elasticsearch
|
- name: Copy templates to elasticsearch
|
||||||
copy: src=templates dest=/etc/elasticsearch/
|
copy: src=templates dest=/etc/elasticsearch/
|
||||||
|
|
||||||
|
- name: Wait for elasticsearch to startup
|
||||||
|
wait_for: port=9200 delay=10
|
||||||
|
|
||||||
- name: Get template files
|
- name: Get template files
|
||||||
shell: find . -maxdepth 1 -type f | sed "s#\./##" | sed "s/.json//" chdir=/etc/elasticsearch/templates
|
shell: find . -maxdepth 1 -type f | sed "s#\./##" | sed "s/.json//" chdir=/etc/elasticsearch/templates
|
||||||
register: resultstemplate
|
register: resultstemplate
|
||||||
|
|||||||
Reference in New Issue
Block a user