ansible-galaxy no longer working

Hello,
About a week ago I updated ansible and am getting the following error:

[ansible@jump04 ansible1]$ /usr/bin/ansible-galaxy install --force -p roles -r /opt/syseng/automation/ansible1/roles.yml --ignore-errors
Starting galaxy role install process
ERROR! Unexpected Exception, this is probably a bug: ‘version’
to see the full traceback, use -vvv
[ansible@jump04 ansible1]$

ansible [core 2.14.14]
config file = /opt/syseng/automation/ansible1/ansible.cfg
configured module search path = [‘/opt/syseng/automation/ansible1/{{ ANSIBLE_HOME ~ "/plugins/modules’, ‘/usr/share/ansible/plugins/modules’, ‘/opt/syseng/automation/ansible1/library" }}’]
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /opt/syseng/automation/ansible1/ansible_collections:/opt/syseng/automation/ansible1/collection
executable location = /usr/bin/ansible
python version = 3.9.18 (main, Jan 24 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True
[ansible@jump04 ansible1]$

I’m running:
RHEL 9.4

Can you show us what your requirements file contains? (And I’m curious why you call it “/opt/syseng/automation/ansible1/roles.yml” rather than “/something/something/requirements.yml”.)

Was there anything interesting when you ran it with “-vvv”?

ansible-galaxy just pulls down my roles. I just haven’t changed it yet.

Also I don’t have a requirements.yml. I use the roles.yml.

Hi I am getting this same error on RHEL 8 and RHEL 9 using the latest version of ansible on BOTH.

Also does the yaml file I call need to be requirements.yml? I prefer it be called roles.yml since I’m using this to install all of my roles. It just makes sense to me for now. I have no problem changing it…

Here is the output:

[ansible@jump05 ansible1]$ /usr/bin/ansible-galaxy role install -p roles -r /opt/syseng/automation/ansible1/roles.yml -f -i -vvv
ansible-galaxy [core 2.16.3]
config file = /opt/syseng/automation/ansible1/ansible.cfg
configured module search path = [‘/opt/syseng/automation/ansible1/{{ ANSIBLE_HOME ~ "/plugins/modules’, ‘/usr/share/ansible/plugins/modules’, ‘/opt/syseng/automation/ansible1/library" }}’]
ansible python module location = /usr/lib/python3.12/site-packages/ansible
ansible collection location = /opt/syseng/automation/ansible1/ansible_collections:/opt/syseng/automation/ansible1/collection
executable location = /usr/bin/ansible-galaxy
python version = 3.12.3 (main, Jun 19 2024, 10:06:03) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)] (/usr/bin/python3.12)
jinja version = 3.1.2
libyaml = True
Using /opt/syseng/automation/ansible1/ansible.cfg as config file
Reading requirement file at ‘/opt/syseng/automation/ansible1/roles.yml’

There is a gap here because it lists all of the my repos and I would rather not post that infromation.

Starting galaxy role install process
Processing role grafana_new
ERROR! Unexpected Exception, this is probably a bug: ‘version’
the full traceback was:

Traceback (most recent call last):
File “/usr/lib/python3.12/site-packages/ansible/cli/init.py”, line 659, in cli_executor
exit_code = cli.run()
^^^^^^^^^
File “/usr/lib/python3.12/site-packages/ansible/cli/galaxy.py”, line 749, in run
return context.CLIARGS’func’
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/site-packages/ansible/cli/galaxy.py”, line 120, in method_wrapper
return wrapped_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/site-packages/ansible/cli/galaxy.py”, line 1403, in execute_install
self._execute_install_role(role_requirements)
File “/usr/lib/python3.12/site-packages/ansible/cli/galaxy.py”, line 1487, in _execute_install_role
if role.install_info[‘version’] != role.version or force:

KeyError: 'version'
[ansible@jump05 ansible1]$