Role dependencies not being installed automatically

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.

They are not installed automatically.

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?

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

Ok cool, thanks!