fix path for first_found lookup

This commit is contained in:
Jérémy Lecour 2021-05-04 12:39:47 +02:00 committed by Jérémy Lecour
parent a5658b7f26
commit 58cd1fedfa

View file

@ -121,13 +121,13 @@
src: "{{ item }}" src: "{{ item }}"
dest: /etc/metricbeat/metricbeat.yml dest: /etc/metricbeat/metricbeat.yml
force: "{{ metricbeat_force_config }}" force: "{{ metricbeat_force_config }}"
loop: "{{ query('first_found', templates) }}" loop: "{{ query('first_found', templates) }}"
vars: vars:
templates: templates:
- "templates/metricbeat/metricbeat.{{ inventory_hostname }}.yml.j2" - "templates/metricbeat/metricbeat.{{ inventory_hostname }}.yml.j2"
- "templates/metricbeat/metricbeat.{{ host_group | default('all') }}.yml.j2" - "templates/metricbeat/metricbeat.{{ host_group | default('all') }}.yml.j2"
- "templates/metricbeat/metricbeat.default.yml.j2" - "templates/metricbeat/metricbeat.default.yml.j2"
- "templates/metricbeat.default.yml.j2" - "templates/metricbeat.default.yml.j2"
notify: restart metricbeat notify: restart metricbeat
when: metricbeat_update_config | bool when: metricbeat_update_config | bool
when: metricbeat_use_config_template | bool when: metricbeat_use_config_template | bool