Ateempt alternate way to load os family tasks

This commit is contained in:
2022-03-13 21:59:29 +13:00
parent f55d35ffb4
commit 630c999fe4

View File

@@ -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:
include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "{{ ansible_os_family }}.yml"
skip: True
- '{{ ansible_os_family }}.yml'
paths:
- 'vars'