Merge "Refactor the use of include_vars"
This commit is contained in:
commit
a453e2cfe2
@ -1,2 +0,0 @@
|
||||
---
|
||||
# Note(TheJulia): This file is intentionally left empty. Do not edit.
|
@ -23,18 +23,18 @@
|
||||
- ansible_distribution == "CentOS"
|
||||
- ansible_distribution_version|int >= 9
|
||||
|
||||
- name: "Load distribution defaults"
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "../defaults/required_defaults_{{ ansible_distribution }}.yml"
|
||||
- "../defaults/required_defaults_{{ ansible_os_family }}.yml"
|
||||
|
||||
- name: "Include OS version-specific defaults"
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "../defaults/required_defaults_{{ ansible_distribution }}_{{ ansible_distribution_release }}.yml"
|
||||
- "../defaults/required_defaults_{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml"
|
||||
- "../defaults/dummy-defaults.yml"
|
||||
- name: Gather variables for each operating system
|
||||
include_vars: "{{ lookup('first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||
paths:
|
||||
- "{{ role_path }}/vars"
|
||||
|
||||
- name: "Install required packages"
|
||||
package:
|
||||
|
Loading…
x
Reference in New Issue
Block a user