ansible-role-dotfiles/tasks/main.yml

19 lines
571 B
YAML
Raw Permalink Normal View History

---
- name: Show (ansible_distribution)-(ansible_facts.distribution_major_version)
debug:
msg: "{{ ansible_distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
- name: Run tasks based on the OS type, or a default if not found.
2023-11-19 16:17:12 +00:00
include_tasks:
file: "{{ task_target }}"
apply:
become: yes
loop_control:
loop_var: task_target
with_first_found:
- "{{ ansible_distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
- "{{ ansible_distribution }}.yml"
- "{{ ansible_os_family }}.yml"
- "default.yml"
2023-11-19 16:17:12 +00:00