2017-09-20 23:56:00 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Include distribution specific variables
|
2024-01-13 16:08:19 +00:00
|
|
|
ansible.builtin.include_vars:
|
2017-09-20 23:56:00 +00:00
|
|
|
file: "{{ item }}"
|
|
|
|
name: _os_specific
|
|
|
|
with_first_found:
|
|
|
|
- "{{ ansible_distribution_release }}.yml"
|
|
|
|
- "{{ ansible_distribution }}.yml"
|
|
|
|
- "{{ ansible_os_family }}.yml"
|
|
|
|
- "default.yml"
|
|
|
|
|
|
|
|
- name: Set OS specific vars if undefined
|
2024-01-13 16:08:19 +00:00
|
|
|
ansible.builtin.set_fact: {
|
2017-09-20 23:56:00 +00:00
|
|
|
"{{ item.key }}":
|
|
|
|
"{{ hostvars[inventory_hostname][item.key] | default(item.value) }}"
|
|
|
|
}
|
|
|
|
with_dict: "{{ _os_specific }}"
|