# Role dependencies

**URL:** <https://forum.ansible.com/t/role-dependencies/23317>\
**Category:** Ansible Project\
**Created:** [December 22, 2016, 12:16pm UTC](https://forum.ansible.com/t/role-dependencies/23317 "2016-12-22T12:16:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fanvalt](https://avatars.discourse-cdn.com/v4/letter/f/2bfe46/32.png) [@fanvalt](https://forum.ansible.com/u/fanvalt)\
**Post date:** [December 22, 2016, 12:16pm UTC](https://forum.ansible.com/t/role-dependencies/23317/1 "2016-12-22T12:16:38Z")

</div>

Hello,

I have a playbook with one role to install an application split on 2 servers, so the inventory file contains 2 entries like this:

[DV70\_DEV]  
ansible\_host=server1 ansible\_user=usertest PARAM=WEB  
ansible\_host=server2 ansible\_user=usertest PARAM=DATABASE

I want once the both installation are done, a dependencie to run a rôle Karaf that needs to know the variables:

```auto
dependencies:
    - { role: apache, webserver: server1 , dbserver: server2, user: usertest}

```

```auto
How can I manage the dependency to be done once the 2 installations are done , how to manage a boolean ?

```

```auto
How can I manage to know variables from the 2 lines of the inventory file ?

```

```auto

```

```auto
Regards

```
