Test fixes + ensuring node is started for templates
This commit is contained in:
parent
ab592724d8
commit
a149328ae8
10 changed files with 30 additions and 19 deletions
|
|
@ -12,13 +12,16 @@
|
|||
with_fileglob:
|
||||
- "{{ es_templates_fileglob }}"
|
||||
|
||||
- name: Ensure elasticsearch is started
|
||||
service: name={{instance_init_script | basename}} state=started enabled=yes
|
||||
|
||||
- name: Wait for elasticsearch to startup
|
||||
wait_for: port={{es_api_port}} 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
|
||||
register: resultstemplate
|
||||
|
||||
- name: Install template(s)
|
||||
command: "curl -sL -XPUT http://{{es_api_host}}:{{es_api_port}}/_template/{{item}} -d @/etc/elasticsearch/templates/{{item}}.json"
|
||||
with_items: "{{ resultstemplate.stdout_lines }}"
|
||||
with_items: "{{ resultstemplate.stdout_lines }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue