diff --git a/filebeat/tasks/main.yml b/filebeat/tasks/main.yml index f0893d10..d4716445 100644 --- a/filebeat/tasks/main.yml +++ b/filebeat/tasks/main.yml @@ -154,13 +154,13 @@ src: "{{ item }}" dest: /etc/filebeat/filebeat.yml force: "{{ filebeat_force_config }}" - loop: "{{ query('first_found', templates) }}" - vars: - templates: - - "templates/filebeat/filebeat.{{ inventory_hostname }}.yml.j2" - - "templates/filebeat/filebeat.{{ host_group }}.yml.j2" - - "templates/filebeat/filebeat.default.yml.j2" - - "templates/filebeat.default.yml.j2" + loop: "{{ query('first_found', templates) }}" + vars: + templates: + - "templates/filebeat/filebeat.{{ inventory_hostname }}.yml.j2" + - "templates/filebeat/filebeat.{{ host_group }}.yml.j2" + - "templates/filebeat/filebeat.default.yml.j2" + - "templates/filebeat.default.yml.j2" notify: restart filebeat when: filebeat_update_config when: filebeat_use_config_template