yum module to skip checking the yum repositories

189 views
Skip to first unread message

Veera

unread,
Nov 9, 2022, 11:15:04 AM11/9/22
to Ansible Project
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 ?


Andrew Latham

unread,
Nov 9, 2022, 11:59:30 AM11/9/22
to ansible...@googlegroups.com
Attempting to grok this, so you want to install an RPM on a system that has no repos configured.


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.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f6f03839-8c77-4777-9d69-600d230ad078n%40googlegroups.com.


--
- Andrew "lathama" Latham -

Veera

unread,
Nov 9, 2022, 12:20:57 PM11/9/22
to Ansible Project
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 
Reply all
Reply to author
Forward
0 new messages