From 630c999fe45e40e45f601a6cccf90903ab88d4fc Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Sun, 13 Mar 2022 21:59:29 +1300 Subject: [PATCH] Ateempt alternate way to load os family tasks --- tasks/main.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index db13e1e..badeccc 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,8 +1,9 @@ --- - name: Include tasks only if one of the files exist, otherwise skip the task - include_tasks: - file: "{{ item }}" - with_first_found: - files: - - "{{ ansible_os_family }}.yml" - skip: True + include_vars: "{{ lookup('first_found', params) }}" + vars: + params: + files: + - '{{ ansible_os_family }}.yml' + paths: + - 'vars'