2023-07-05 18:02:56 +00:00
|
|
|
---
|
2023-11-08 18:15:51 +00:00
|
|
|
- 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
|
2023-11-08 18:15:51 +00:00
|
|
|
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
|
|
|
|