# multiple playbooks in one git repository

**URL:** <https://forum.ansible.com/t/multiple-playbooks-in-one-git-repository/30073>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [April 6, 2019, 8:46am UTC](https://forum.ansible.com/t/multiple-playbooks-in-one-git-repository/30073 "2019-04-06T08:46:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Steffen](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@Dan\_Steffen](https://forum.ansible.com/u/Dan_Steffen)\
**Post date:** [April 6, 2019, 8:46am UTC](https://forum.ansible.com/t/multiple-playbooks-in-one-git-repository/30073/1 "2019-04-06T08:46:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![matburt](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/matburt/32/3612_2.png) [@matburt](https://forum.ansible.com/u/matburt)\
**Post date:** [April 8, 2019, 3:36am UTC](https://forum.ansible.com/t/multiple-playbooks-in-one-git-repository/30073/2 "2019-04-08T03:36:10Z")

</div>

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](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](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](https://docs.ansible.com/ansible-tower/latest/html/userguide/job_templates.html))
