Importing role from repo

I am trying to setup a new common role to run on all my servers. This role could be run from AWX/AAP or Ad-hoc from a jump server. I want to import other roles from my git repo. It could be bitbucket or github, etc. In previous versions of ansible there were examples to use import_roles with a remote source. Is there a module that I need to use?
I am using the latest version of Ansible on RHEL 8/9.
An example would be something like this.

This is what I think I need to do:

- import_role: https://git.example.com/something/repo.git

This is what I want to use.

# from github
- src: https://github.com/bennojoy/nginx

# from Bitbucket
- src: git+https://bitbucket.org/willthames/git-ansible-galaxy
  version: v1.4

Which is the better way to do accomplish this?

run ansible-galaxy to install roles, Ansible imports and includes can ONLY work with installed resources, they won’t fetch and install for you.

That’s fine if I run it ad-hoc. What if I need to call roles, when using AAP/AWX?

awx/AAP have a ‘auto install’ if you set requirements file under roles/ 13. Projects — Ansible Tower User Guide v3.4.4

If I tell the role to use a requirements.yml do I need specify it in the tasks/main.yml or will it automatically pick it up?

it is not part of a role, it is in the roles/ directory of the job’s project

hmmm. ok I will need to review this then.