- name: Select tasks for detected distribution ansible.builtin.include_tasks: "{{ distro_file }}" with_first_found: - "{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml" - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" loop_control: loop_var: distro_file