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
1 changed files with 9 additions and 9 deletions

View File

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