You've already forked ansible-role-common
Ateempt alternate way to load os family tasks
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
---
|
---
|
||||||
- name: Include tasks only if one of the files exist, otherwise skip the task
|
- name: Include tasks only if one of the files exist, otherwise skip the task
|
||||||
include_tasks:
|
include_vars: "{{ lookup('first_found', params) }}"
|
||||||
file: "{{ item }}"
|
vars:
|
||||||
with_first_found:
|
params:
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_os_family }}.yml"
|
- '{{ ansible_os_family }}.yml'
|
||||||
skip: True
|
paths:
|
||||||
|
- 'vars'
|
||||||
|
|||||||
Reference in New Issue
Block a user