# Installing multiple roles from the same repo (Ansible Galaxy)

**URL:** <https://forum.ansible.com/t/installing-multiple-roles-from-the-same-repo-ansible-galaxy/31513>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [October 22, 2019, 7:09pm UTC](https://forum.ansible.com/t/installing-multiple-roles-from-the-same-repo-ansible-galaxy/31513 "2019-10-22T19:09:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ry1](https://avatars.discourse-cdn.com/v4/letter/r/9fc29f/32.png) [@Ry1](https://forum.ansible.com/u/Ry1)\
**Post date:** [October 22, 2019, 7:09pm UTC](https://forum.ansible.com/t/installing-multiple-roles-from-the-same-repo-ansible-galaxy/31513/1 "2019-10-22T19:09:10Z")

</div>

Hi everyone,

I’m having difficulties figuring out how I can install two different roles from the same project. Below is the project tree,  
Project\_Name  
ansible\_role  
role1  
role2

The different between these two roles are their configurations hence why they’re in the same project directory.

When i run ansible galaxy, role1 gets installed and role2 will live inside role1’s directory  
roles  
role1  
defaults  
meta  
role2  
spitz  
tasks  
templates

The goal is have galaxy install both roles.  
roles  
role1  
defaults  
etc  
role2  
defaults  
etc

Thanks in advance,  
Ry

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [October 23, 2019, 7:58am UTC](https://forum.ansible.com/t/installing-multiple-roles-from-the-same-repo-ansible-galaxy/31513/2 "2019-10-23T07:58:10Z")

</div>

> Hi everyone,
> 
> I'm having difficulties figuring out how I can install two different roles from the same project. Below is the project tree,  
> Project\_Name  
> &nbsp;&nbsp;ansible\_role  
> &nbsp;&nbsp;&nbsp;&nbsp;role1  
> &nbsp;&nbsp;&nbsp;&nbsp;role2
> 
> The different between these two roles are their configurations hence why they're in the same project directory.

I'm not sure what you mean by this. If the only difference between the  
two roles is their configuration, why not have one role, and call them  
using those different configurations? Please supply more information  
about what you mean.

> When i run ansible galaxy, role1 gets installed and role2 will live inside role1's directory  
> roles  
> &nbsp;&nbsp;role1  
> &nbsp;&nbsp;&nbsp;&nbsp;defaults  
> &nbsp;&nbsp;&nbsp;&nbsp;meta  
> &nbsp;&nbsp;&nbsp;&nbsp;role2  
> &nbsp;&nbsp;&nbsp;&nbsp;spitz  
> &nbsp;&nbsp;&nbsp;&nbsp;tasks  
> &nbsp;&nbsp;&nbsp;&nbsp;templates

"will live" sounds like you want it to be like this - is that true?

Also, "when i run galaxy" can mean anything.  
Tell us what commands you run, which version of ansible, and what your  
configuration files look like.

> The goal is have galaxy install both roles.  
> roles  
> &nbsp;&nbsp;role1  
> &nbsp;&nbsp;&nbsp;&nbsp;defaults  
> &nbsp;&nbsp;&nbsp;&nbsp;etc  
> &nbsp;&nbsp;role2  
> &nbsp;&nbsp;&nbsp;&nbsp;defaults  
> &nbsp;&nbsp;&nbsp;&nbsp;etc

This looks pretty standard.
