ansible-role-elasticsearch/tasks/data.yml

21 lines
616 B
YAML
Raw Normal View History

2020-02-09 14:15:24 +00:00
---
2023-07-05 09:36:13 +00:00
- name: Copy ilm policies
2022-02-17 09:52:15 +00:00
elasticsearch_ilm_policy:
2023-07-05 09:36:13 +00:00
name: "{{ item.key }}"
phases: "{{ item.value | default({}) }}"
loop: "{{ elasticsearch_ilm_policies | dict2items }}"
2022-02-17 09:52:15 +00:00
loop_control:
2023-07-05 09:36:13 +00:00
label: "{{ item.key }}"
2022-02-17 09:52:15 +00:00
run_once: true
tags: elasticsearch
2023-07-05 09:36:13 +00:00
- name: Copy index templates
2020-02-09 14:15:24 +00:00
elasticsearch_template:
2023-07-05 09:36:13 +00:00
name: "{{ item.key }}"
index_patterns: "{{ item.value.index_patterns }}"
settings: "{{ item.value.settings | default({}) }}"
mappings: "{{ item.value.mappings | default({}) }}"
loop: "{{ elasticsearch_index_templates | dict2items }}"
2020-02-09 14:15:24 +00:00
run_once: true
tags: elasticsearch