multiple playbooks in one git repository

Hello,

yesterday I start playing around with awx and I already found out how to define credentials, projects and scm-sources but now I have the question is there a way to define multiple playbooks in one git-Repository so awx can aoutomatically check the repository out and run the specified playbook in the project? I only found example where the “main.yml” take place on the root-level of the Repository and I am looking for somehing link

git_repository --- ansible-projekt-1 ------ site.yml --- ansible-project-2 ------ site.yml

so I can define one awx-project for ansible-project-1 and one project for ansible-project-2

Maybe we have to change our workflow but before we do this I would very thankful for a hint if this i really necessary
best regards
Dan

What you’ve proposed should work fine, we do our best to traverse through the repo looking for playbook files, this is what that looks like on our side:

https://github.com/ansible/awx/blob/devel/awx/main/models/projects.py#L191

The key is that it needs to look like a playbook when we read it:

https://github.com/ansible/awx/blob/devel/awx/main/utils/ansible.py#L39

We also won’t exhaustively search all files for big directory trees, but we do allow you to enter the filename manually either in the JobTemplate playbook selection UI or via the Job Template definition API itself (this is where you select which playbook to run for the job, see https://docs.ansible.com/ansible-tower/latest/html/userguide/job_templates.html)