# Dependencies from private repo

**URL:** <https://forum.ansible.com/t/dependencies-from-private-repo/22596>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [September 20, 2016, 2:53pm UTC](https://forum.ansible.com/t/dependencies-from-private-repo/22596 "2016-09-20T14:53:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karibou\_Hunter](https://avatars.discourse-cdn.com/v4/letter/k/d26b3c/32.png) [@Karibou\_Hunter](https://forum.ansible.com/u/Karibou_Hunter)\
**Post date:** [September 20, 2016, 2:53pm UTC](https://forum.ansible.com/t/dependencies-from-private-repo/22596/1 "2016-09-20T14:53:54Z")

</div>

Hi all,

I am trying to automatically pull roles within a role meta/main.yml dependencies.

I have seen something [deleted on documentation](https://github.com/ansible/ansible/commit/38465283669829a4b9255976a889d9d7aef093bc) about this format :

`  
dependencies:

- { role: ‘git+http://git.example.com/repos/role-foo,v1.1,foo’ }

`

I am using Ansible 2.1.0.0, and I have the same behaviour than [Brian in this ML.](https://groups.google.com/forum/#!searchin/ansible-project/dependencies$20git%7Csort:date/ansible-project/kGzBmwnqC34/TYTCiP3KCQAJ)

Do we must use _ansible-galaxy install_ command with _requirements.yml_ file before executing the playbook ?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Alexander\_H\_Laughlin](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@Alexander\_H\_Laughlin](https://forum.ansible.com/u/Alexander_H_Laughlin)\
**Post date:** [September 22, 2016, 2:47am UTC](https://forum.ansible.com/t/dependencies-from-private-repo/22596/2 "2016-09-22T02:47:14Z")

</div>

Hi Karibou,

I think what you’re looking for is the [Vault](http://docs.ansible.com/ansible/playbooks_vault.html). You can store the url in your vault with the username and password included. That file would look like this:

`role-foo-url: 'git+[http://username:password@git.example.com/repos/role-foo,v1.1,foo](http://git.example.com/repos/role-foo,v1.1,foo)'`

And you would adjust the play in your email as follows:

`  
dependencies:

- { role: role-foo-url }

`

Alternatively you could put just the username and password in the vault and do the replacement on execution of the play itself.

Thanks,  
Alex

---

<div class="post-metadata">

**Author:** ![Karibou\_Hunter](https://avatars.discourse-cdn.com/v4/letter/k/d26b3c/32.png) [@Karibou\_Hunter](https://forum.ansible.com/u/Karibou_Hunter)\
**Post date:** [September 30, 2016, 3:01pm UTC](https://forum.ansible.com/t/dependencies-from-private-repo/22596/3 "2016-09-30T15:01:42Z")

</div>

Hi Alex,

Thanks for your response, but I think you misunderstood what I am trying to achieve.  
I want to pull automatically with dependencies, the corresponding roles.

I tried differents solutions, and the one with usage of requirements.yml before playbook launch seems best.
