For my initial ansible-awx setup i took my roles, inventories and playbooks and put them into one GIT-repository secured by ssh key authentication. HTTPS seems to be broken in Ansible-AWX 7.0
I imported the GIT-repository as a project into ansible-awx
I already managed to reference playbooks and inventories. How do i manage to use the roles i have inside the GIT repository?
I tried to use the following requirements.yml:
- src: ansible-awx@<some azure devops repo>
name: hosting
scm: git
The hosting role can not be resolved when trying to run the playbook that applies the hosting role onto my inventory.
I already tried the following:
- Outsourcing the role into a different repo
- Using git personal tokens inside the src
Without any success.
Help is very much appreciated.
Update: The actual setup. 1. Role is placed inside a seperate GIT Repo
/
- defaults
- files
- handlers
- meta
- tasks
- templates
- vars
- Role repository is added as a project with the correct credentials (SSH Key)
Resulting Error Message:
Identity added: /tmp/awx_5_kjl4ecco/artifacts/5/ssh_key_data (/tmp/awx_5_kjl4ecco/artifacts/5/ssh_key_data)
ERROR! the role 'celum-hosting' was not found in /var/lib/awx/projects/_8__cps_tc_git/playbooks/hosting/roles:/var/lib/awx/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/var/lib/awx/projects/_8__cps_tc_git/playbooks/hosting
The error appears to be in '/var/lib/awx/projects/_8__cps_tc_git/playbooks/hosting/playbook_applyhostingrole.yml': line 4, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
roles:
- { role: celum-hosting }
^ here