--- - name: Install Python3-DNF5 if necessary command: cmd: dnf5 -y install python3-libdnf5 creates: /usr/lib*/python3.*/site-packages/libdnf5 when: ansible_pkg_mgr == "dnf5"