# Dependencies between Roles (parent out of sync)

**URL:** <https://forum.ansible.com/t/dependencies-between-roles-parent-out-of-sync/20342>\
**Category:** Ansible Project\
**Created:** [January 25, 2016, 5:46pm UTC](https://forum.ansible.com/t/dependencies-between-roles-parent-out-of-sync/20342 "2016-01-25T17:46:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_O\_Mahony](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@Richard\_O\_Mahony](https://forum.ansible.com/u/Richard_O_Mahony)\
**Post date:** [January 25, 2016, 5:46pm UTC](https://forum.ansible.com/t/dependencies-between-roles-parent-out-of-sync/20342/1 "2016-01-25T17:46:34Z")

</div>

Hi

I am new to Ansible so apologies if I am going about this the wrong way. I am creating a project with two roles. A ‘java’ role and a ‘jetty’ role. Jetty has a dependency on java being installed so I was going to model it as a role dependency.

The problem I have is that the Jetty runtime has a runtime dependency on JAVA\_HOME which may change if a newer version of java is installed - this newer version of Java deployment will break the Jetty runtime. I can fix this by re-running the ‘jetty’ role (which inherits the JAVA\_HOME data from its child ‘java’ role) thereby updating its config. Other users of my automation may not know of this implicit dependency and would not re-execute ‘jetty’

I was wondering if this is a scenario that others have come across?

Any help would be appreciated.

Richard.
