browbeat/ansible/install/roles/es-template/tasks/main.yml
Sai Sindhur Malleni ee9e6b6a2f ES 7 update
Change-Id: Ia0360b04020188812ed2a4fb36e05e8f7a73a9bc
2020-04-20 12:43:17 +05:30

37 lines
1015 B
YAML

---
- name: Upload templates
uri:
url: http://{{ es_ip }}:{{ es_local_port }}/_template/{{ item | basename | regex_replace('\.json','') }}
method: PUT
body: "{{ lookup('file', item) }}"
body_format: json
with_fileglob:
- "{{ browbeat_path }}/elastic/templates/browbeat*"
ignore_errors: true
when: not (elastic5 or elastic7)
- name: Upload templates
uri:
url: http://{{ es_ip }}:{{ es_local_port }}/_template/{{ item | basename | regex_replace('\.json','') }}
method: PUT
body: "{{ lookup('file', item) }}"
body_format: json
with_fileglob:
- "{{ browbeat_path }}/elastic/v5templates/browbeat*"
ignore_errors: true
when: elastic5
- name: Upload templates
uri:
url: http://{{ es_ip }}:{{ es_local_port }}/_template/{{ item | basename | regex_replace('\.json','') }}
method: PUT
body: "{{ lookup('file', item) }}"
body_format: json
with_fileglob:
- "{{ browbeat_path }}/elastic/v7templates/browbeat*"
ignore_errors: true
when: elastic7