By default, Ansible in Fedora 22 hits this problem with its dnf module: https://github.com/ansible/ansible-modules-extras/issues/471 The Ansible yum module can't be used either, as that attempts to import the yum *Python* API, which dnf doesn't even try to emulate. This means that while this problem can be worked around if you have a way of bootstrapping yum-utils onto the system, you're stuck if you're using Ansible itself to do the bootstrapping.
Yes, we are aware. ;) Toshio backported the fixes he has for the dnf module and pushed a rawhide build already. He was going to push builds to all other branches soon. You can in fact still use the yum module, but you of course need to install yum and yum-utils for that, and it has some corner cases. Look for an f22 update to test soon...
ansible-1.9.1-2.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/ansible-1.9.1-2.fc22
Hey Nick! Please test that build (or one of the builds for the other Fedora/RHEL releases). The person on the bug report didn't explicitly say this worked so I'd love to have some confirmation that this solves the problems. Thanks!
Package ansible-1.9.1-2.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ansible-1.9.1-2.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-9219/ansible-1.9.1-2.fc22 then log in and leave karma (feedback).
Looks good here: $ rpm -qa ansible ansible-1.9.1-2.fc22.noarch $ ansible localhost -m dnf -a "name=ansible state=latest" localhost | success >> { "changed": false, "msg": "", "rc": 0, "results": [ "All packages providing ansible are up to date" ] }
ansible-1.9.1-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.