ansible-role-elasticsearch/tasks/data.yml

20 lines
616 B
YAML

---
- name: Copy ilm policies
elasticsearch_ilm_policy:
name: "{{ item.key }}"
phases: "{{ item.value | default({}) }}"
loop: "{{ elasticsearch_ilm_policies | dict2items }}"
loop_control:
label: "{{ item.key }}"
run_once: true
tags: elasticsearch
- name: Copy index templates
elasticsearch_template:
name: "{{ item.key }}"
index_patterns: "{{ item.value.index_patterns }}"
settings: "{{ item.value.settings | default({}) }}"
mappings: "{{ item.value.mappings | default({}) }}"
loop: "{{ elasticsearch_index_templates | dict2items }}"
run_once: true
tags: elasticsearch