# Role dependencies not being installed automatically

**URL:** <https://forum.ansible.com/t/role-dependencies-not-being-installed-automatically/24714>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [June 13, 2017, 5:34pm UTC](https://forum.ansible.com/t/role-dependencies-not-being-installed-automatically/24714 "2017-06-13T17:34:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Listing](https://avatars.discourse-cdn.com/v4/letter/l/3d9bf3/32.png) [@Listing](https://forum.ansible.com/u/Listing)\
**Post date:** [June 13, 2017, 5:34pm UTC](https://forum.ansible.com/t/role-dependencies-not-being-installed-automatically/24714/1 "2017-06-13T17:34:28Z")

</div>

Hi all,

I have created a role and want some role dependencies to automatically be installed when running my own role. For instance, this is my dependency in ./meta/main.yml:

`

dependencies:

- geerlingguy.php

`

But when running ./test/test.yml or another playbook that includes this role, I get the following error:

`

ERROR! the role ‘geerlingguy.php’ was not found in /etc/ansible/roles/roles:/etc/ansible/roles:/etc/ansible/roles:/etc/ansible/roles

The error appears to have been in ‘/etc/ansible/roles/listing/meta/main.yml’: line 56, column 5, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

dependencies:

- geerlingguy.php  
^ here

`

When I first install this role via ‘ansible-galaxy install geerlingguy.php’ and then run the playbook/role, all goes well and the Geerlingguy role is included. Am I doing something wrong with it? I thought that role dependencies would automatically be installed.

Kind regards.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [June 13, 2017, 5:35pm UTC](https://forum.ansible.com/t/role-dependencies-not-being-installed-automatically/24714/2 "2017-06-13T17:35:38Z")

</div>

They are not installed automatically.

---

<div class="post-metadata">

**Author:** ![Listing](https://avatars.discourse-cdn.com/v4/letter/l/3d9bf3/32.png) [@Listing](https://forum.ansible.com/u/Listing)\
**Post date:** [June 13, 2017, 5:37pm UTC](https://forum.ansible.com/t/role-dependencies-not-being-installed-automatically/24714/3 "2017-06-13T17:37:44Z")

</div>

Ah, so they are just there for the users that use this role so they can install the roles manually and then it will be included?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [June 13, 2017, 5:39pm UTC](https://forum.ansible.com/t/role-dependencies-not-being-installed-automatically/24714/4 "2017-06-13T17:39:43Z")

</div>

It is a runtime import, it has nothing to do with installation.

---

<div class="post-metadata">

**Author:** ![Listing](https://avatars.discourse-cdn.com/v4/letter/l/3d9bf3/32.png) [@Listing](https://forum.ansible.com/u/Listing)\
**Post date:** [June 13, 2017, 5:41pm UTC](https://forum.ansible.com/t/role-dependencies-not-being-installed-automatically/24714/5 "2017-06-13T17:41:31Z")

</div>

Ok cool, thanks!
