# Working with Ansible Galaxy Roles

**URL:** <https://forum.ansible.com/t/working-with-ansible-galaxy-roles/28799>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [October 16, 2018, 4:25pm UTC](https://forum.ansible.com/t/working-with-ansible-galaxy-roles/28799 "2018-10-16T16:25:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Davies](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@Matt\_Davies](https://forum.ansible.com/u/Matt_Davies)\
**Post date:** [October 16, 2018, 4:25pm UTC](https://forum.ansible.com/t/working-with-ansible-galaxy-roles/28799/1 "2018-10-16T16:25:52Z")

</div>

Hi Everyone

There’s about 10 developers working on our ansible codebase, configuring approx 20 VM’s, it’s going to grow rapidly.

We’ve just started working with ansible galaxy roles and I was wondering if anyone has any links/tips/suggestions on how to manage the workflow?

We’d like to be able to update the ansible galaxy roles easily.

Are we talking about using git submodules here? I’ve read a bit about a requirements file?

Any tips or help will be greatly appreciated.

Thanks in advance

Matt

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [October 16, 2018, 4:29pm UTC](https://forum.ansible.com/t/working-with-ansible-galaxy-roles/28799/2 "2018-10-16T16:29:44Z")

</div>

checkout requirements.yml and having each role in a seperate git repo.

---

<div class="post-metadata">

**Author:** ![Matt\_Davies](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@Matt\_Davies](https://forum.ansible.com/u/Matt_Davies)\
**Post date:** [October 16, 2018, 4:37pm UTC](https://forum.ansible.com/t/working-with-ansible-galaxy-roles/28799/3 "2018-10-16T16:37:21Z")

</div>

Thanks for the prompt response Jonathan

So the roles being separate git repos would then be git submodules?

Is that the idea?

I’ll read up on requirements.yml now.

Matt

---

<div class="post-metadata">

**Author:** ![ngonzal](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@ngonzal](https://forum.ansible.com/u/ngonzal)\
**Post date:** [October 16, 2018, 5:17pm UTC](https://forum.ansible.com/t/working-with-ansible-galaxy-roles/28799/4 "2018-10-16T17:17:40Z")

</div>

You can also update ansible.cfg to point to one or more role directories. Which is nice if each of your roles is in a git repo, but you want to work on things locally without pushing up changes every time. See the roles\_path option: [https://docs.ansible.com/ansible/latest/reference\_appendices/config.html#default-roles-path](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-roles-path)

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [October 16, 2018, 5:18pm UTC](https://forum.ansible.com/t/working-with-ansible-galaxy-roles/28799/5 "2018-10-16T17:18:33Z")

</div>

not exactly. Each role will be in its own git repository then requirements.yml will list all the roles you need for that specific play. Makes it easier to manage the roles in different git repositories and not have other changes mixed together.

---

<div class="post-metadata">

**Author:** ![Mischa\_ter\_Smitten](https://avatars.discourse-cdn.com/v4/letter/m/c0e974/32.png) [@Mischa\_ter\_Smitten](https://forum.ansible.com/u/Mischa_ter_Smitten)\
**Post date:** [October 16, 2018, 5:51pm UTC](https://forum.ansible.com/t/working-with-ansible-galaxy-roles/28799/6 "2018-10-16T17:51:03Z")

</div>

I can really recommend submodules, but it’s probably a bit more advance than requirements.yml. We manage over 150 roles this way and it’s working like a charm.
