# Ansible  yum module  arguement equivalent for  repolist.

**URL:** <https://forum.ansible.com/t/ansible-yum-module-arguement-equivalent-for-repolist/30445>\
**Category:** Ansible Project\
**Created:** [May 29, 2019, 3:31pm UTC](https://forum.ansible.com/t/ansible-yum-module-arguement-equivalent-for-repolist/30445 "2019-05-29T15:31:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veera](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/veera/32/4107_2.png) [@Veera](https://forum.ansible.com/u/Veera)\
**Post date:** [May 29, 2019, 3:31pm UTC](https://forum.ansible.com/t/ansible-yum-module-arguement-equivalent-for-repolist/30445/1 "2019-05-29T15:31:19Z")

</div>

Hi,

I am using the following snippet as part of a play.  
I have to refresh the yum repository list as I will replace the repository file every time I run the playbook .  
So , After having a successful play to copy my test.repo file to /etc/yum.repos.d/test.repo . I am able to successfully run the “yum repolist” with command module.

> - name: Refresh the yum repository cache  
> #yum:
> 
> # update\_cache: yes
> 
> command: “yum repolist”  
> register: repo\_list

But ansible suggest to use yum module , but the doc have no equivalent for the “repolist” of yum .  
Is “update\_cache” do the same fuction like “yum repolist”?

---

<div class="post-metadata">

**Author:** ![Kunalsing\_Thakur](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@Kunalsing\_Thakur](https://forum.ansible.com/u/Kunalsing_Thakur)\
**Post date:** [May 29, 2019, 4:19pm UTC](https://forum.ansible.com/t/ansible-yum-module-arguement-equivalent-for-repolist/30445/2 "2019-05-29T16:19:34Z")

</div>

Check this out.  
[https://github.com/Tomorrow9/ansible/commit/423d6391a5cba4b188719de7c65e7c550326d82c](https://github.com/Tomorrow9/ansible/commit/423d6391a5cba4b188719de7c65e7c550326d82c)
