# Ansible 2.7.8, role dependencies(github repo) in meta/main.yml are not downloaded automatically, why? still have to run ansible-galaxy install -r requirements.yml?

**URL:** <https://forum.ansible.com/t/ansible-2-7-8-role-dependencies-github-repo-in-meta-main-yml-are-not-downloaded-automatically-why-still-have-to-run-ansible-galaxy-install-r-requirements-yml/29872>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [March 13, 2019, 6:11am UTC](https://forum.ansible.com/t/ansible-2-7-8-role-dependencies-github-repo-in-meta-main-yml-are-not-downloaded-automatically-why-still-have-to-run-ansible-galaxy-install-r-requirements-yml/29872 "2019-03-13T06:11:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rella.guo](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@rella.guo](https://forum.ansible.com/u/rella.guo)\
**Post date:** [March 13, 2019, 6:11am UTC](https://forum.ansible.com/t/ansible-2-7-8-role-dependencies-github-repo-in-meta-main-yml-are-not-downloaded-automatically-why-still-have-to-run-ansible-galaxy-install-r-requirements-yml/29872/1 "2019-03-13T06:11:27Z")

</div>

Ansible verison: 2.7.8

I define role B as Role A dependencies in meta/main.yml like this:

```auto
dependencies:
- { role: B, src: 'git+https://github.xxx/xxx/B.git', version: '1.0' }

```

When I run playbook with Role A, I suppose ansible would download Role B automatically. But not. Why?  
Shall I run ansible-galaxy install -r requirements.yml firstly?

Thank you.

---

<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:** [March 13, 2019, 7:03pm UTC](https://forum.ansible.com/t/ansible-2-7-8-role-dependencies-github-repo-in-meta-main-yml-are-not-downloaded-automatically-why-still-have-to-run-ansible-galaxy-install-r-requirements-yml/29872/2 "2019-03-13T19:03:50Z")

</div>

Yes.

When a role is installed, any dependencies are automatically installed  
as well (from [https://galaxy.ansible.com/docs/using/installing.html#dependencies](https://galaxy.ansible.com/docs/using/installing.html#dependencies)).  
Running playbooks (i.e. deploying infrastructure) does not magically  
pull in remote content.

So with ansible-galaxy you make sure all the roles etc are in place.  
And then you playbooks can use them.

Dick
