---
# Include variables and define needed variables.
- name: Include OS-specific variables.
- include_vars: "{{ ansible_os_family }}.yml"
-
-- name: Define lttng_modules_packages.
- set_fact:
- lttng_modules_packages: "{{ __lttng_modules_packages | list }}"
- when: lttng_modules_packages is not defined
+ include_vars: "{{ item }}"
+ with_first_found:
+ - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
+ - "{{ ansible_distribution }}.yml"
+ - "{{ ansible_os_family }}.yml"
# Setup/install tasks.
- include: setup-RedHat.yml
- when: ansible_os_family == 'RedHat'
+ when: ansible_os_family in ['RedHat', 'Rocky']
- include: setup-Debian.yml
when: ansible_os_family == 'Debian'