- hosts: localhost tasks: - block: - command: "dnf install -y 'dnf-command(copr)'" - command: dnf copr enable -y rpmsoftwaremanagement/dnf-nightly - command: dnf install -y python3-libdnf5 - include_role: name: dnf vars: dnf5: true dnf_log_files: - /var/log/dnf5.log when: ansible_distribution == 'Fedora' module_defaults: dnf: use_backend: dnf5