ansible/ansible — pull request #6574 by MiLk (2014-03-19 07:51:58+00:00)
Title: Improve yum module perfomance

Make the `what_provides` function to return only the most recent version of each package.
When a package have a huge list of versions available, it will only test if the most recent is installed.

I tested with the following task:
```
- name: "Update yum and plugins"
yum-devel:
name={{ item }}
state=latest
enablerepo=epel-yum-rawhide
with_items:
- yum
- yum-plugin-fastestmirror
- yum-presto
```
Repo file here: http://repos.fedorapeople.org/repos/james/yum-rawhide/epel-yum-rawhide.repo

Before this change without repoquery: 3m57s
After this change without repoquery: 34s

Before this change with repoquery: 4m20s
After this change with repoquery: 20s