# yum module to  skip checking  the yum repositories

**URL:** <https://forum.ansible.com/t/yum-module-to-skip-checking-the-yum-repositories/37326>\
**Category:** Ansible Project\
**Created:** [November 9, 2022, 4:15pm UTC](https://forum.ansible.com/t/yum-module-to-skip-checking-the-yum-repositories/37326 "2022-11-09T16:15:04Z")\
**Posts on this page:** 3\
**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:** [November 9, 2022, 4:15pm UTC](https://forum.ansible.com/t/yum-module-to-skip-checking-the-yum-repositories/37326/1 "2022-11-09T16:15:04Z")

</div>

Hi,

I have the below snippet , which installs the local package . However in servers which have not subscribed to satellite/Redhat , the playbook hungs as it continue to search for the repositories in the backgroud.

- name: Installing the local rpm rpm packages in the server  
yum:  
name: /tmp/XXXX-2.3.2.2105-1.x86\_64.rpm  
state: present  
disable\_gpg\_check: yes  
ignore\_errors: true  
register: result\_t1  
tags: install\_localpackage

In yum module , there is no exact option to skip looking into the yum repositories or cache , to override this step.  
Is there any option available in yum to skip looking into yum or have to write a bash script with "rpm -i " to replace it ?

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [November 9, 2022, 4:58pm UTC](https://forum.ansible.com/t/yum-module-to-skip-checking-the-yum-repositories/37326/2 "2022-11-09T16:58:59Z")

</div>

Attempting to grok this, so you want to install an RPM on a system that has no repos configured.

Maybe try cacheonly as mentioned on [https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum\_module.html](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_module.html)

I do not have an RPM based system here to test on. You could use the RPM command line or use the disable\_plugin as I suspect fastestmirrors is getting called. I would maybe also try disabling install\_repoquery. Yellowdog is designed to check repos, that is the main goal of it.

---

<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:** [November 9, 2022, 5:20pm UTC](https://forum.ansible.com/t/yum-module-to-skip-checking-the-yum-repositories/37326/3 "2022-11-09T17:20:56Z")

</div>

Thanks , I already checked the link and disable\_plugin . Both are not helpful .  
I will have to use command/shell - module to call rpm to install the local package
