Fix with_first_found fail when ansible_distribution vars file is missing (issue #5)
This commit is contained in:
parent
3153efe24b
commit
d80f5e5a2c
|
@ -4,8 +4,10 @@
|
||||||
# tasks file for fusioninventory
|
# tasks file for fusioninventory
|
||||||
|
|
||||||
- name: Include package list per OS
|
- name: Include package list per OS
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ lookup('first_found', params) }}"
|
||||||
with_first_found:
|
vars:
|
||||||
|
params:
|
||||||
|
files:
|
||||||
- "{{ ansible_distribution }}.yml"
|
- "{{ ansible_distribution }}.yml"
|
||||||
- "{{ ansible_os_family }}.yml"
|
- "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
|
@ -23,8 +25,10 @@
|
||||||
# Manage agent package [[[1
|
# Manage agent package [[[1
|
||||||
|
|
||||||
# Specific tasks per OS will be in the include otherwise below
|
# Specific tasks per OS will be in the include otherwise below
|
||||||
- include: "{{ item }}"
|
- include: "{{ lookup('first_found', params) }}"
|
||||||
with_first_found:
|
vars:
|
||||||
|
params:
|
||||||
|
files:
|
||||||
- "{{ ansible_distribution }}.yml"
|
- "{{ ansible_distribution }}.yml"
|
||||||
- "{{ ansible_os_family }}.yml"
|
- "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
|
|
Reference in New Issue