Unable to install a package

Hi Folks,

Having a problem with a rc 126 from yum. I have tried the following options and am receiving the following error messages. I did find a reference to this particular error but not on RHEL 2.9.27 (which is what I’m running)

This was working until I removed a variable from the ansible module but has not worked since (I’m unsure if this was the issue, it may be a red herring). I am running with a RedHat Satellite as my content server. As I note below, I can do this manually on the server in question. Ansible seems to have lost parts of its environment at some point, it can’t see the paths anymore.

I am able to do a yum/dnf info pbis-open on the server that the playbook is being run on. I can also do a simple

yum install pbis-open

and this works fine. Any thoughts would be most appreciated

Thanks
David

ansible.builtin.yum

TASK [/etc/ansible/roles/glx-pbis-master : Install pbis] *****************************************************************************************************
task path: /etc/ansible/roles/glx-pbis-master/tasks/redhat_install.yml:12
fatal: [dcslanstsap01t.cprod.corp.ntgov]: FAILED! => changed=false
msg: No package matching ‘pbis-open’ found available, installed or updated
rc: 126
results:

  • No package matching ‘pbis-open’ found available, installed or updated

ansible.builtin.package

TASK [/etc/ansible/roles/glx-pbis-master : Install pbis] *****************************************************************************************************
task path: /etc/ansible/roles/glx-pbis-master/tasks/redhat_install.yml:12
fatal: [dcslanstsap01t.cprod.corp.ntgov]: FAILED! => changed=false
msg: No package matching ‘pbis-open’ found available, installed or updated
rc: 126
results:

  • No package matching ‘pbis-open’ found available, installed or updated

ansible.built.shell and yum as command

TASK [/etc/ansible/roles/glx-pbis-master : Install pbis] *****************************************************************************************************
task path: /etc/ansible/roles/glx-pbis-master/tasks/redhat_install.yml:12
fatal: [dcslanstsap01t.cprod.corp.ntgov]: FAILED! => changed=true
cmd: yum install “pbis-open”
delta: ‘0:00:00.526719’
end: ‘2022-07-11 10:24:44.942498’
msg: non-zero return code
rc: 1
start: ‘2022-07-11 10:24:44.415779’
stderr: ‘Error: Nothing to do’
stderr_lines:
stdout: |-
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

No package pbis-open available.
stdout_lines:

After a rerun

TASK [/etc/ansible/roles/glx-pbis-master : Install pbis] *****************************************************************************************************
task path: /etc/ansible/roles/glx-pbis-master/tasks/redhat_install.yml:12
fatal: [dcslanstsap01t.cprod.corp.ntgov]: FAILED! => changed=true
cmd: yum install “pbis-open”
delta: ‘0:00:00.526719’
end: ‘2022-07-11 10:24:44.942498’
msg: non-zero return code
rc: 1
start: ‘2022-07-11 10:24:44.415779’
stderr: ‘Error: Nothing to do’
stderr_lines:
stdout: |-
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

No package pbis-open available.
stdout_lines:

Tried DNF as this is a RHEL 8.6 box

TASK [/etc/ansible/roles/glx-pbis-master : Install pbis] *****************************************************************************************************
task path: /etc/ansible/roles/glx-pbis-master/tasks/redhat_install.yml:12
fatal: [dcslanstsap01t.cprod.corp.ntgov]: FAILED! => changed=true
cmd: /usr/bin/dnf clean all ; /usr/bin/dnf install “pbis-open”
delta: ‘0:00:00.006736’
end: ‘2022-07-11 10:28:03.068773’
msg: non-zero return code
rc: 127
start: ‘2022-07-11 10:28:03.062037’
stderr: |-
/bin/sh: /usr/bin/dnf: No such file or directory
/bin/sh: /usr/bin/dnf: No such file or directory
stderr_lines:
stdout: ‘’
stdout_lines:

Hi Folks,

Having a problem with a rc 126 from yum. I have tried the following options and am receiving the following error messages. I did find a reference to this particular error but not on RHEL 2.9.27 (which is what I'm running)

"ansible-2.9" is obsolete and should be updated to ansible-core 2.11
at lease. EPEL is probably not going to publish ansible-core for RHEL
7, since RHEL 8 is publishing ansible-core and it's.... well, it's
awkward to repackage for RHEL 7. I've done it, over at
https://github.com/nkadel/ansiblerepo/, but only publish RPM building
tools, not RPMs.

Ignore the "ansible" package from now on, install nad use
ansible-core. What is now called "ansible" isn't, it's a bundle of
more than 100 distinct ansible galaxy collection modules and of very
little practical use to most ansible server setups. The modules can be
installed individually if needed, which is much smaller and likely
more stable.

This was working until I removed a variable from the ansible module but has not worked since (I'm unsure if this was the issue, it may be a red herring). I am running with a RedHat Satellite as my content server. As I note below, I can do this manually on the server in question. Ansible seems to have lost parts of its environment at some point, it can't see the paths anymore.

I am able to do a yum/dnf info pbis-open on the server that the playbook is being run on. I can also do a simple

# yum install pbis-open

Since you've not included the full logs, it's difficult to guess. But
the first step is to get to a more contemporary ansible-core for your
ansible server, I think.

and this works fine. Any thoughts would be most appreciated

Thanks
David

ansible.builtin.yum

TASK [/etc/ansible/roles/glx-pbis-master : Install pbis] *****************************************************************************************************
task path: /etc/ansible/roles/glx-pbis-master/tasks/redhat_install.yml:12
fatal: [dcslanstsap01t.cprod.corp.ntgov]: FAILED! => changed=false
  msg: No package matching 'pbis-open' found available, installed or updated
  rc: 126
  results:
  - No package matching 'pbis-open' found available, installed or updated

I am guessing that whatever other settings you may have are disabling
yum auditing commands for the channel that holds "pbs-open" unless run
as the root user.

Do a "yum list pbs-open" to get a better handle on the issue. Because
that package is not in the standard CENTOS or publich RHEL channels,
as best I can tell.

Unfortunately RH are still insisting on using 2.9 as their only solution without paying for Ansible Automation platform.

I will look at updating but I’ve done the yum list, yum info and yum install from the command line on the server I’m running the playbook on.

I’m happy to attach logs but which ones?

When in trouble, or in doubt

Run in circles, scream and shout

Unfortunately RH are still insisting on using 2.9 as their only solution without paying for Ansible Automation platform.

Update to RHEL 8, for which ansible-core 2.12 is available as an RPM.

ansible-core 2.11 can be fairly easily built for RHEL 7 as an RPM if
you need, my published building tools ar at
https://github.com/nkadel/ansiblerepo

I will look at updating but I've done the yum list, yum info and yum install from the command line on the server I'm running the playbook on.

What does "yum list pbs-info" say? Especially if you run it as a non-root user?

Would only use sudo as the permissions are set to not allow non-root users to install software. We like to know what they are putting on there.

I’ll certainly look at utilising a more recent version ut need to take some time as I’m currently using ansible on the Satellite server

Thanks

When in trouble, or in doubt

Run in circles, scream and shout