diff --git a/tasks/main.yml b/tasks/main.yml index f204af3..8ee4233 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,8 +1,8 @@ --- - name: Include tasks only if one of the files exist, otherwise skip the task - include_tasks: "{{ lookup('first_found', params) }}" + include_tasks: '{{ item }}' vars: params: files: - '{{ ansible_os_family }}.yml' - skip: true + loop: "{{ q('first_found', params, errors='ignore') }}"