ERROR! the role 'dev-sec.ssh-hardening' was not found

Hi all,

I’m new to AWX, but not new to Ansible. When running a job in AWX it can’t seem to find my roles, even though they exist in /var/lib/awx/projects/_8__ansible_internal_playbooks/roles

It keeps trying to look in the wrong directory like /var/lib/awx/projects/_8__ansible_internal_playbooks/playbook-name or /var/lib/awx/projects/_8__ansible_internal_playbooks/playbook-name/roles

I can see the roles do exist in /var/lib/awx/projects/_8__ansible_internal_playbooks/roles with docker exec.

I thought I could put a variable like role_path: …/roles in the job template but that doesn’t seem to work. Any ideas?

Full error output:

ERROR! the role 'dev-sec.ssh-hardening' was not found in /var/lib/awx/projects/_8__ansible_internal_playbooks/ansible-ssh-hardening/roles:/var/lib/awx/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/var/lib/awx/projects/_8__ansible_internal_playbooks/ansible-ssh-hardening

Do you transfer the roles directly to AWX or let AWX grab them from Git via specifying them in roles/requirements.yml? This makes it easier to provision AWX and also makes it easier To reuse roles.

Hi Rod,

I have them grabbed via git/galaxy using roles/requirements.yml currently. Every time I run a new job it fetches my playbook directory and makes sure it pulls the latest roles via requirements.yml