Ansible yum module arguement equivalent for repolist.

11 views
Skip to first unread message

Veera

unread,
May 29, 2019, 11:31:19 AM5/29/19
to Ansible Project
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"?

Kunalsing Thakur

unread,
May 29, 2019, 12:20:03 PM5/29/19
to Ansible Project

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/01be47bc-81eb-46c3-bbfd-cd7563a0c19d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages