--- - name: Uninstall prerequisite packages ansible.builtin.package: name: "{{ item }}" state: absent loop: "{{ packages_uninstall_pre + packages_uninstall_pre_extra }}" - name: Include OS specific tasks ansible.builtin.include_tasks: file: "{{ item }}" with_first_found: - paths: - "tasks" files: - "{{ ansible_os_family | lower }}.yml" skip: True - name: Uninstall packages ansible.builtin.package: name: "{{ item }}" state: absent loop: "{{ packages_uninstall + packages_uninstall_extra }}" - name: Install packages ansible.builtin.package: name: "{{ item }}" enablerepo: "{{ packages_enablerepo }}" state: present loop: "{{ packages_install + packages_install_extra }}"