I have a problem when upgrading gpfs packages using ansible. When executing the update using the module it always fails due ta dependency between packages that are in the same upgrade
Hi @Jasonroot1 , welcome to the Ansible Community Forum!
Let me give you a couple of tips so you others can help.
You can copy and paste the content of the playbook here instead of pasting an image, and use the </> button in the toolbar right in the text box you are writing, to give it format. This should help when someone wants to point to a section or provide advice.
From the screenshot it’s not clear how that task is working or what the scope is, I can understand you are trying to install multiple rpms from a local directory, but I’m not sure why you are listing with_items
, when using the shell
task with the *.rpm
.
I would advise you to use the yum module and list each package name individually with their fullname (with a loop
or with_items
if you wish to avoid multiple tasks) , instead of the *.rpm
- name: Install nginx rpm from a local file
ansible.builtin.yum:
name: /usr/local/src/nginx-release-centos-6-0.el6.ngx.noarch.rpm
state: present
There are two different classes of issue here: Ansible and package management. I’m only addressing one of the Ansible issues, which is: You are looping over a list of dicts, but you don’t seem to be using any of the loop’d items. That is, your task never uses {{ item.name }}
from what I can see. Maybe settle on a strategy of either wild card matching in the shell, or looping, but maybe not both.
but what I want is to update, update an already installed version
I think you need to be using the “installation toolkit” to coordinate such an upgrade. That’s beyond the scope of “normal” yum
or dnf
operations. You should be following this documentation set: