We are beginning the phase of testing roles on server using AAP 2.5 and i'm running into some issues. Right now ALL of my roles are separate git/scm repos. Everything I'm reading says to make it monolithic. However I've read that this makes troubleshooting difficult.
When I go to run one of the roles, I get this error:
ERROR! the role 'config_venafi' was not found in /runner/project/tests/roles:/runner/requirements_roles:/home/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/runner/project/tests
The error appears to be in '/runner/project/tests/test.yml': line 5, column , but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
roles:
- config_someROLE
^ here
I have modified the 'Paths to expose to isolated jobs' to include the folder where AAP should be cloning them too. But it doesn't matter. The tmeplate fails. I've reached out to support and they have told me to add this to my requirements.yml:
roles:
- name: config_someROLE
src: git+file:///opt/aap/aap/controller/data/projects/_15__config_someROLE/
This seems to be counter productive.
Hi there,
Could you try the following definition for your requirements.yml file?
roles:
- name: config_someROLE
source: /opt/aap/aap/controller/data/projects/_15__config_someROLE/
type: dir
Here you have some examples from the upstream documentation:
https://docs.ansible.com/ansible-core/2.16/collections_guide/collections_installing.html
Please, let me know if this helps
Hello,
first: check out https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-multiple-roles-from-a-file if your requirements.yml is correct.
Instead of using paths from your AAP Controller, use paths from your real git repos.
second: it could be a good idea, if your roles are inside a collection, because you can use AAP Hub.
My roles are not in a collection right now. These are all modular single role git repos. I shouldn't have to specify the folder location, should I?
No,
you don't have to specify the folder location.
So I should put the https link in there?
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.