including a role from different project

in my AWX i have 2x ansible Git projects (internal SCM)

Till now i have been doing something like this on my local ansible host (no awx)

project1/role/abc/tasks/main.yml

project2/roles/edf/tasks/main.yml

Whilst in project1 directory and running a standard ansible-playbook with role “abc”, I am able to include a role from project2 using the relative path, example:

  • include_role:
    name: …/project2/roles/edf

Works fine, however this is broken when i move to awx and it cant find the roles within the awx structure.

I read something about a requirements.yml, will this apply here? If so do i reference a project in awx (how) or directly the git scm of project2?

Thanks for any insight.

In AWX we isolate projects from one another (because they could have different permission levels). We have some plans around this over the next 6 months or so but you may considering pulling roles using a requirements file: https://docs.ansible.com/ansible/latest/reference_appendices/galaxy.html#installing-multiple-roles-from-a-file

Many thanks - after some modifications and understanding the concept of galaxy a bit better i got this working.

Hi, could you kindly how you managed to pull the roles from the other project into yours ?;

I’m facing the same issue reading your solution would be trully appreciated (and I’m I have been working with AWX for like 24 hours now).

Best,