cancel
Showing results for 
Search instead for 
Did you mean: 
swider
Mission Specialist
Mission Specialist
  • 4,847 Views

problem with dnf module, can't pass parameter none of them seem to work(nobest, skip_broken, exclude

Jump to solution

Hello, recently we tried to update dnf/yum and we found there are some problems with dependency, in one of the redhat knowledgebase article (Dependency issue while updating IBMinvscout-3.1.2-1.el8.ppc64le on IBM Power Server - Red Hat Custom...) it is possible to use --nobest option. When I used it, it didn't work to me and oter option as well. Did someone experienced such problems or can comment on this. I appreciate any hint or help.

 

thank you

Labels (1)
Tags (2)
2 Solutions

Accepted Solutions
bonnevil
Starfighter Starfighter
Starfighter
  • 4,701 Views

@swiderYes, that's exactly what I needed.  You're running Ansible 2.9 (presumably from the *ansible* package shipped in RHEL 8.5 based on the other strings I'm seeing here). That's the last version of Ansible that bundled all the modules with the core Ansible executables.  You should look at https://docs.ansible.com/ansible/2.9/modules/dnf_module.html for documentation on how the Ansible 2.9 version of that module works.

The documentation that you were looking at was for upstream Ansible 7 (which uses Ansible Core 2.14).  Ansible Core 2.14 has a significantly newer version of ansible.builtin.dnf.

RHEL 8.5 might have an Ansible Core 2.14 package as *ansible-core*; but that'll only include the ansible.builtin Ansible Content Collection modules.  If you need modules from other Ansible Content Collections, you have a few choices:

  1. You can get other Ansible Content Collections from the community's Ansible Galaxy service, unsupported by Red Hat, and install them on your control node or in your project's directory.
  2. You can get a subscription for Red Hat Ansible Automation Platform 2.3.  Red Hat provides additional Ansible Content Collections in the automation execution environment containers used by the new *ansible-navigator* tool that works similarly to *ansible-playbook*, and it's based on Ansible Core 2.14 too.  You'd also get support and other things.  I think the free developer subscription would allow you to experiment with that.
  3. You can use community Ansible upstream: the only way they ship that now is through *pip*.  The Ansible numbering scheme now refers to a particular version of Ansible Core + a set of Ansible Content Collections curated by the community (and possibly different than what Red Hat supports).
  4. You can keep using Ansible 2.9 for now. 

 

View solution in original post

swider
Mission Specialist
Mission Specialist
  • 4,603 Views

Hello @bonnevil, yes you are right the version of ansible we have installed and I was checking on the internet (Ansible doc) were different. Finally I got the solution from IBM support. It was to download locally these two problematic packages from IBM devel repo and install them before and update and then to perform the upgrade of our RHEL. And it worked for us. So, thank you for you all for the comments and help

View solution in original post

8 Replies
Fran_Garcia
Starfighter Starfighter
Starfighter
  • 4,822 Views

this kind of question is probably better suited for a support case, but nonetheless:

 

- Ensure the RPM you are trying to install is intended for the RHEL version you have. From the link you pasted it seems that you either need a newer RPM of your custom software, or use an older version of RHEL.

- Reading the acutal yum output will give you an idea on what is wrong/broken and why yum cannot automatically fix it. As the KCS mentions, manually testing with --skip-broken or --allow-erasing might give some clues on what is broken as well.

swider
Mission Specialist
Mission Specialist
  • 4,819 Views

Hello Fran_Garcia, thank you for the hint, but the real problem is that the option nobest doesn't work for ansible.builtin.dnf. I tried to follow the article and to use the workaround, but I received: 

 

"Unsupported parameters for (ansible.builtin.dnf) module: nobest Supported parameters include:..."

 

Maybe i descriobed it wrongly, sorry

BR

 

Chetan_Tiwary_
Community Manager
Community Manager
  • 4,798 Views

Hi @swider ,

Have you tried using the shell / command module to run the dnf command with --nobest flag ? Does it give same error ?

If it does not help , I guess you need a product support and you can try raising a support case for the same here :  https://access.redhat.com/support 

swider
Mission Specialist
Mission Specialist
  • 4,791 Views

Hello @Chetan_Tiwary_ , I raised a ticket and once I recived the answer I will notify you.I didn't try them yet, as it is recommended using modules provided specifically for these purposes.And I would use these modules if I had not seen a documentation that such an option is possible, however, it exists.:

ansible.builtin.dnf module – Manages packages with the dnf package manager — Ansible Documentation

Strange thing is, that when I use ansible-doc dnf, there is no such option...?

But anyway, thank you for your advise it's very good tip

 

bonnevil
Starfighter Starfighter
Starfighter
  • 4,786 Views

@swider  What version of Ansible (or what execution environment with AAP 2) are you using?  I'm wondering what version of the `ansible.builtin` Ansible Content Collection that you have.

swider
Mission Specialist
Mission Specialist
  • 4,733 Views

Hi @bonnevil 

you mean this...?

$ ansible-galaxy --version
ansible-galaxy 2.9.27
...

ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible-galaxy
python version = 3.6.8 (default, Jun 14 2022, 13:06:42) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]
$ ansible --version
ansible 2.9.27
....
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.6.8 (default, Jun 14 2022, 13:06:42) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]

Thx

 

0 Kudos
bonnevil
Starfighter Starfighter
Starfighter
  • 4,702 Views

@swiderYes, that's exactly what I needed.  You're running Ansible 2.9 (presumably from the *ansible* package shipped in RHEL 8.5 based on the other strings I'm seeing here). That's the last version of Ansible that bundled all the modules with the core Ansible executables.  You should look at https://docs.ansible.com/ansible/2.9/modules/dnf_module.html for documentation on how the Ansible 2.9 version of that module works.

The documentation that you were looking at was for upstream Ansible 7 (which uses Ansible Core 2.14).  Ansible Core 2.14 has a significantly newer version of ansible.builtin.dnf.

RHEL 8.5 might have an Ansible Core 2.14 package as *ansible-core*; but that'll only include the ansible.builtin Ansible Content Collection modules.  If you need modules from other Ansible Content Collections, you have a few choices:

  1. You can get other Ansible Content Collections from the community's Ansible Galaxy service, unsupported by Red Hat, and install them on your control node or in your project's directory.
  2. You can get a subscription for Red Hat Ansible Automation Platform 2.3.  Red Hat provides additional Ansible Content Collections in the automation execution environment containers used by the new *ansible-navigator* tool that works similarly to *ansible-playbook*, and it's based on Ansible Core 2.14 too.  You'd also get support and other things.  I think the free developer subscription would allow you to experiment with that.
  3. You can use community Ansible upstream: the only way they ship that now is through *pip*.  The Ansible numbering scheme now refers to a particular version of Ansible Core + a set of Ansible Content Collections curated by the community (and possibly different than what Red Hat supports).
  4. You can keep using Ansible 2.9 for now. 

 

swider
Mission Specialist
Mission Specialist
  • 4,604 Views

Hello @bonnevil, yes you are right the version of ansible we have installed and I was checking on the internet (Ansible doc) were different. Finally I got the solution from IBM support. It was to download locally these two problematic packages from IBM devel repo and install them before and update and then to perform the upgrade of our RHEL. And it worked for us. So, thank you for you all for the comments and help

Join the discussion
You must log in to join this conversation.