- when: ansible_distribution == "Fedora"
  block:
    - name: Ensure libdnf is not installed
      command: dnf remove -y python3-libdnf5

    - name: Downgrade dnf to the original version
      command: dnf install -y --disable-repo=* --enable-repo=fedora python3-libdnf5

    - name: Run DNF tests
      include_role:
        name: dnf
      vars:
        test_auto_install: false
