ansible-dhcpd/tasks/dist_vars.yml

19 lines
501 B
YAML
Raw Permalink Normal View History

---
- name: Include distribution specific variables
2024-01-13 16:08:19 +00:00
ansible.builtin.include_vars:
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: {
"{{ item.key }}":
"{{ hostvars[inventory_hostname][item.key] | default(item.value) }}"
}
with_dict: "{{ _os_specific }}"