# yum module - remove repoquery hard dependency (for speed optimization)

**URL:** <https://forum.ansible.com/t/yum-module-remove-repoquery-hard-dependency-for-speed-optimization/19018>\
**Category:** Ansible Project\
**Created:** [August 14, 2015, 12:34pm UTC](https://forum.ansible.com/t/yum-module-remove-repoquery-hard-dependency-for-speed-optimization/19018 "2015-08-14T12:34:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefan\_Eriksson](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@Stefan\_Eriksson](https://forum.ansible.com/u/Stefan_Eriksson)\
**Post date:** [August 14, 2015, 12:34pm UTC](https://forum.ansible.com/t/yum-module-remove-repoquery-hard-dependency-for-speed-optimization/19018/1 "2015-08-14T12:34:00Z")

</div>

In the yum module, remove hard dependency for repoquery. (for speed optimization)

Run:

- name: verify sudo,ntp,iotop is latest  
action: yum name={{ item }} state=latest  
with\_items:
- sudo
- ntp
- iotop  
when: ansible\_os\_family == “RedHat”

and then run the same with regular yum install sudo ntp iotop  
It would be very nice actually get this task completed much faster.

Actual Results:

Yum now takes a very long time and its because of repoquery depenency, there has been various people asking why this is,

some resolve it by running yum from command: module.  
Others create an alternative module: [http://blog.grozak.com/2014/04/04/01-yum2-ansible-module/](http://blog.grozak.com/2014/04/04/01-yum2-ansible-module/) (the reason as described in the blogpost, speed)  
[http://grokbase.com/t/gg/ansible-project/1486ckhr51/speed-up-yum-related-tasks](http://grokbase.com/t/gg/ansible-project/1486ckhr51/speed-up-yum-related-tasks) here Michael suggested he’s changed his mind about requiring repoquery, and that its worth revisiting.  
For me managing 100 servers all with yum module, a run takes almost 2hours to complete, and 90% of the time spent is with the yum module.
