(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 https://github.com/OSC/ood-ansible/archive/v3.0.1.tar.gz
- 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
---
#collections:
# - name: awx.awx
# - name: community.general
roles:
- name: osc.open_ondemand
(ansible) jose@jose-t14s:~/projects/phoebe_aee$
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.
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.
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 somehowpartially (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.