# use rules from different git repos/locations

**URL:** <https://forum.ansible.com/t/use-rules-from-different-git-repos-locations/32208>\
**Category:** Ansible Project\
**Created:** [February 12, 2020, 6:57am UTC](https://forum.ansible.com/t/use-rules-from-different-git-repos-locations/32208 "2020-02-12T06:57:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanctc](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@sanctc](https://forum.ansible.com/u/sanctc)\
**Post date:** [February 12, 2020, 6:57am UTC](https://forum.ansible.com/t/use-rules-from-different-git-repos-locations/32208/1 "2020-02-12T06:57:08Z")

</div>

Hi Folks,  
Can I use roles from several different git repos/locations to single ansible?  
e.g.

---

<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:** [February 12, 2020, 12:18pm UTC](https://forum.ansible.com/t/use-rules-from-different-git-repos-locations/32208/2 "2020-02-12T12:18:32Z")

</div>

Hi

What do you mean by “a single ansible”?

In any case where a role came from (git, in your case) is not relevant, just make sure they are available locally.

The roles docs are reasonably clear:

[https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_reuse\_roles.html](https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html)

---

<div class="post-metadata">

**Author:** ![sanctc](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@sanctc](https://forum.ansible.com/u/sanctc)\
**Post date:** [February 12, 2020, 12:31pm UTC](https://forum.ansible.com/t/use-rules-from-different-git-repos-locations/32208/3 "2020-02-12T12:31:39Z")

</div>

Hi,  
I used the below option after copying the rules from git and it worked for me.

```auto
<b>- hosts: all
  roles:
    - server
    - /path/to/my/roles/common
    - /path/to/my/client_roles/client</b>

```

```auto
**My intention was to use roles from different locations in a playbook**

```

```auto
On Wednesday, February 12, 2020 at 5:49:08 PM UTC+5:30, Dick Visser wrote:

```
