Ansible yum module arguement equivalent for repolist.

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”?

Check this out.
https://github.com/Tomorrow9/ansible/commit/423d6391a5cba4b188719de7c65e7c550326d82c