# How do you organize ansible roles?

**URL:** <https://forum.ansible.com/t/how-do-you-organize-ansible-roles/35796>\
**Category:** Ansible Project\
**Created:** [September 28, 2021, 8:03pm UTC](https://forum.ansible.com/t/how-do-you-organize-ansible-roles/35796 "2021-09-28T20:03:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![holodata](https://avatars.discourse-cdn.com/v4/letter/h/54ee81/32.png) [@holodata](https://forum.ansible.com/u/holodata)\
**Post date:** [September 28, 2021, 8:03pm UTC](https://forum.ansible.com/t/how-do-you-organize-ansible-roles/35796/1 "2021-09-28T20:03:31Z")

</div>

Hey! I’m curious about how do you organize Ansible roles. I want to share a few roles in the public Git repository.

- What do you think about storing roles in the ~/ansible/roles directory?
- Do you recommend pushing the entire ~/ansible directory together with playbooks and other stuff in the git repository or execute git init in the directories with role-related stuff like ~/ansible/roles/role1, ~/ansible/roles/role2, etc.?
- If I decided to go the first way, what’s the best method to share a single ansible role?

---

<div class="post-metadata">

**Author:** ![jcpetro](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jcpetro](https://forum.ansible.com/u/jcpetro)\
**Post date:** [September 28, 2021, 8:52pm UTC](https://forum.ansible.com/t/how-do-you-organize-ansible-roles/35796/2 "2021-09-28T20:52:25Z")

</div>

So, this may not answer all of your questions, but hopefully it hits on a few. I have a git repo for the “project” directory structure, and then a repository for each role. I then use the requirements.yml to grab the roles I need for a particular project, and it shoves them into the roles dir for the project.

–John
