meta dependencies but fire after a role

22 views
Skip to first unread message

James Morgan

unread,
May 26, 2016, 8:42:35 AM5/26/16
to Ansible Project
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

James Morgan

unread,
May 26, 2016, 8:46:34 AM5/26/16
to Ansible Project
I should add that we are stuck on 1.9.4

James Morgan

unread,
May 26, 2016, 8:46:59 AM5/26/16
to Ansible Project
I should add that we are stuck on 1.9.4

On Thursday, 26 May 2016 13:42:35 UTC+1, James Morgan wrote:

James Morgan

unread,
May 26, 2016, 9:01:57 AM5/26/16
to Ansible Project
Solved my own problem. Using a role that only contains meta dependencies works


Johannes Kastl

unread,
May 26, 2016, 2:33:12 PM5/26/16
to ansible...@googlegroups.com
On 26.05.16 15:01 'James Morgan' via Ansible Project wrote:
> Solved my own problem. Using a role that only contains meta dependencies
> works

Nice trick, thanks for sharing your solution.

Johannes

signature.asc
Reply all
Reply to author
Forward
0 new messages