Unable to get shared roles to work

Firstly, apologies for cross-posting to Ansible group as well, I think that was the wrong location.

Due to policies, I cannot upload company code to Galaxy. I am trying to use git roles to work around this.

I based my approach off this answer, and by referencing the doco here.

All the Ansible code is in two repositories, a company-shared repo (acme), and an app-specific repo (simpleapp).

When I run the playbook from simpleapp, it errors out, stating it can’t find the shared role in acme, but looking in the cache dir, it seem to download both repositories.

This is a stripped-down version, just trying to call the shared debug role:

$ tree acme/
acme/
├── README.md
└── roles
└── users
├── defaults
│ └── main.yml
├── meta
│ └── main.yml
└── tasks
└── main.yml

5 directories, 4 files
$ tree simpleapp/
simpleapp/
├── README.md
├── playbooks
│ └── run_debug.yml
└── roles
└── requirements.yml

2 directories, 3 files
$ cat acme/roles/users/meta/main.yml
---
galaxy_info:
author: Werner van der Merwe
company: ICS
license: MIT
min_ansible_version: '2.0'
role_name: 'users'
description: Create shared users
$ cat simpleapp/roles/requirements.yml
- src: https://REDACTED
scm: git
version: main
name: acme
$ cat simpleapp/playbooks/run_debug.yml
---
- name: Playbooks that calls a role from the shared repo
hosts: all
gather_facts: false

roles:
- role: acme.users

The error I get in the AWX console:

ERROR! the role 'acme.users' was not found in /runner/project/playbooks/roles:/runner/requirements_roles:/runner/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/runner/project/playbooks

Any assistance will be greatly appreciated.

Hi,
The error should be the structure of acme role.
This should contain everything that now is under roles folder, like
$ tree acme/
acme/
├── README.md

── defaults
└── main.yml
├── meta
│ └── main.yml
└── tasks
└── main.yml

Then in your playbook requirements.yml you can include role similar as your example, like

And call the role with acme.user keyword.

If you have more tha one role reletad acme, those roles can be wrapped in a Collection, but i suggest to start with standalone roles.

Good luck!