Foreign roles in AAP help

Folks, recently I experienced something weird. I’m using AAP2.4 and 2.5, it happens on both versions.

I have a github repository which contains a bunch if ansible roles and each role is a directory with proper role structure (default, meta, tasks, etc). When calling the roles from another ansible playbook located in a different repository, we need to have “roles/requirements.yml” defined, for example:

- src: https://github.com/my-org/roles-repo.git
scm: git
version: main
name: foreign

When calling the foreign role, we normally use this structure:

- name: calling foreign role 1
include role:
name: "{{ item }}"
loop:
- foreign/role1
- foreigh/role2
- ......

But in my case, it is not working. When I login to the controller, I discovered this folder structure:

|--foreign
   |--foreign
      |--role1
      |--role2
   default (Last foreign role default folder)
   meta (Last foreign role meta folder)
   tasks (Last foreign role tasks folder)

So when calling the foreign roles, I have to do this: (this is working in my case)

- foreign/foreign/role1
- foreign/foreign/role2

In order to let the AAP controller to put the last role into foreign/foreign/ folder, I have to add a fake role “zzz-fake-role” in the roles-repo repository and it becomes the last foreign role.

I’m I doing something wrong? Any help would be appreciated :slight_smile: