# meta dependencies but fire after a role

**URL:** <https://forum.ansible.com/t/meta-dependencies-but-fire-after-a-role/21578>\
**Category:** Ansible Project\
**Created:** [May 26, 2016, 12:42pm UTC](https://forum.ansible.com/t/meta-dependencies-but-fire-after-a-role/21578 "2016-05-26T12:42:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![James\_Morgan](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@James\_Morgan](https://forum.ansible.com/u/James_Morgan)\
**Post date:** [May 26, 2016, 12:42pm UTC](https://forum.ansible.com/t/meta-dependencies-but-fire-after-a-role/21578/1 "2016-05-26T12:42:35Z")

</div>

Hi,

Is there any mechanism like meta dependencies that allows me to fire a role after the main role has executed instead of before?

Currently I have to call the subsequent roles in every playbook. It would be much nicer if I could specify them in the role but have them executed after.

Technically these roles have a dependency on the main role but that would create some horrible chaining of roles.

An example is that I have an application role. It needs to have init.d, apache, config and a handful of other roles run. These should be run after the main one as they are dependent on rpms being installed etc.

Any help appreciated

James

---

<div class="post-metadata">

**Author:** ![James\_Morgan](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@James\_Morgan](https://forum.ansible.com/u/James_Morgan)\
**Post date:** [May 26, 2016, 12:46pm UTC](https://forum.ansible.com/t/meta-dependencies-but-fire-after-a-role/21578/2 "2016-05-26T12:46:17Z")

</div>

I should add that we are stuck on 1.9.4

---

<div class="post-metadata">

**Author:** ![James\_Morgan](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@James\_Morgan](https://forum.ansible.com/u/James_Morgan)\
**Post date:** [May 26, 2016, 12:46pm UTC](https://forum.ansible.com/t/meta-dependencies-but-fire-after-a-role/21578/3 "2016-05-26T12:46:59Z")

</div>

I should add that we are stuck on 1.9.4

---

<div class="post-metadata">

**Author:** ![James\_Morgan](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@James\_Morgan](https://forum.ansible.com/u/James_Morgan)\
**Post date:** [May 26, 2016, 1:01pm UTC](https://forum.ansible.com/t/meta-dependencies-but-fire-after-a-role/21578/4 "2016-05-26T13:01:56Z")

</div>

Solved my own problem. Using a role that only contains meta dependencies works

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [May 26, 2016, 6:33pm UTC](https://forum.ansible.com/t/meta-dependencies-but-fire-after-a-role/21578/5 "2016-05-26T18:33:04Z")

</div>

Nice trick, thanks for sharing your solution.

Johannes
