Ansible requirements.yml: ERROR! Expected role dependencies to be a list

Hi, is this expected?

(ansible) jose@jose-t14s:~/projects/phoebe_aee$ ansible-galaxy install -f -r ./requirements.yml 
Starting galaxy role install process
- changing role osc.open_ondemand from v3.0.1 to unspecified
- downloading role 'open_ondemand', owned by osc
- downloading role from
- extracting osc.open_ondemand to /home/jose/.ansible/roles/osc.open_ondemand
- osc.open_ondemand (v3.0.1) was installed successfully
ERROR! Expected role dependencies to be a list. Role osc.open_ondemand (v3.0.1) has meta/requirements.yml {'collections': ['community.general']}
(ansible) jose@jose-t14s:~/projects/phoebe_aee$ cat requirements.yml 
#  - name: awx.awx
#  - name: community.general
  - name: osc.open_ondemand
(ansible) jose@jose-t14s:~/projects/phoebe_aee$

Google returns only one (!) instance of this error message from this ansible feature proposal

Second and more relevant content is this bugreport, Documentation on requirements.yml is confusing or misleading · Issue #73347 · ansible/ansible · GitHub - where member of Ansible staff says:

We do not support dependencies between stand alone roles and collections

so isn’t meta/requirements.yml actually using some old/invalid syntax? Anyway I must admit that I’m not ansible guru…

What version of ansible are you running? That syntax appears to be correct. Seems like that was last updated when I was fixing linting issues. So I’m guessing you’re using an older ansible version than we are.

What version of ansible are you running?

2.14.2, full version info below.

The more I read docu the more it seems to me that role can not have collection as a dependency. But it is not explicitly stated anywhere - there is only that

Role dependencies let you automatically pull in other roles when using a role.


(ansible) jose@jose-t14s:~/projects/phoebe_aee$ ansible-galaxy --version
ansible-galaxy [core 2.14.2]
  config file = None
  configured module search path = ['/home/jose/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/jose/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-galaxy
  python version = 3.11.2 (main, May 30 2023, 17:45:26) [GCC 12.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
(ansible) jose@jose-t14s:~/projects/phoebe_aee$

The outcome: After even more reading of Ansible documentation, I learned that ansible execution environments, involved in this case are actually not expected to contain role at all - the fact it’s actually somehow partially (pretending) that it’s working was subject of my confusion.

So I think the unexpected behavior reported above is actually fine and it is not indicating bug in OOD Ansible code.