Handle OS requirements for Ansible
This commit is contained in:
19
tasks/main.yml
Normal file
19
tasks/main.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
# tasks file for ensure_ansible_prereq
|
||||
- name: 'include variables'
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
include_tasks:
|
||||
file: '{{ lookup("first_found", findme ) }}'
|
||||
vars:
|
||||
findme:
|
||||
files:
|
||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
||||
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}-default.yml'
|
||||
- '{{ ansible_distribution }}-default.yml'
|
||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}.yml'
|
||||
- '{{ ansible_os_family }}-{{ ansible_distribution_major_version }}-default.yml'
|
||||
- '{{ ansible_os_family }}-default.yml'
|
||||
- 'default.yml'
|
||||
errors: 'ignore'
|
||||
|
||||
Reference in New Issue
Block a user