# Role Dependencies - download only

**URL:** <https://forum.ansible.com/t/role-dependencies-download-only/27530>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [May 15, 2018, 10:41am UTC](https://forum.ansible.com/t/role-dependencies-download-only/27530 "2018-05-15T10:41:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![profhase85](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@profhase85](https://forum.ansible.com/u/profhase85)\
**Post date:** [May 15, 2018, 10:41am UTC](https://forum.ansible.com/t/role-dependencies-download-only/27530/1 "2018-05-15T10:41:32Z")

</div>

Hi together, managing a bigger project I am defining role dependencies in role’s

`

# meta.yml

- name: myrole  
src: git+git@myserver/myrole.git  
version: master

`

The problem is that ansible also _always_ executes the dependencies _prior_ to the role,  
some of the role dependencies should be executed at a certain point with `include_role`

**Example:**

- I have a ‘java’ role which installs the newest java version .
- The ‘java’ role depends on the `certificates` role, which needs to be executed **after** the java role,  
as the java keystore does not exist prior to that
- thus the java role includes the certificates role

`

# playbook.yml

- hosts: myhost  
roles:
- {role: java, tags: [‘java’]}

# java/tasks/main.yml

- include\_tasks: do\_install\_java\_and\_more.yml

- import\_role:  
name: certificates

# java/meta/main.yml

galaxy\_info:  
author: Me  
description: Role to install java

dependencies:

- name: certificates  
src: myserver/certificates.git  
version: master

`

→ This causes the `certificates` role to be executed twice.

**Question** : Is there any way to define dependencies just to be installed with galaxy?

Thanks 🙂
