Hello! I know this thread is old but I am interested and I just got an idea 
on which I would like your opinion.

In my case, I have a "nginx/proxy" role that creates subdomains proxies to 
services on my server. I also have a "compose" role that manages those 
services.
The "nginx/proxy" gets the list of proxy configs from a variable that is 
updated by "compose", which in the present case requires me to explicitly 
make "compose" run before "nginx/proxy".

What if I want to use dependencies? I thought that I could separate 
"compose" in two parts: "compose/services" would manage the services and 
"compose/proxy" would only update the proxy list. Then I could write that 
"nginx/proxy" depends on "compose/proxy".

I do not know if it is clear, if it is really relevant, and if such a 
workaround actually makes sense and would be usable.

Thank you for your comments :)

Le mercredi 21 janvier 2015 21:47:32 UTC+9, Vadim V a écrit :
>
> Hello. 
> Is any news about this problem ? 
>
> On Friday, February 21, 2014 at 12:13:28 AM UTC+2, Maciej Gol wrote:
>>
>> That'd be a very useful feature! Currently, it's possible to declare what 
>> roles roleA depends on. But sometimes, when writing isolated modules 
>> that constitute to a whole, one would like to express that roleA should 
>> depend on roleB and roleC when declaring those. Something named like 
>> required_by, required_in, required_before (note that we would like both 
>> roleB and roleC to be played before roleA). I think that name 
>> required_after would rather refer to a list of roles that should run 
>> before the role the name has been declared in, effectively being a synonym 
>> for dependencies.
>>
>> On Tuesday, December 10, 2013 7:46:35 PM UTC+1, James Martin wrote:
>>>
>>> Michael, 
>>>
>>>
>>> requires_after sounds like a good name. 
>>>
>>>
>>> Here's the way I have my roles structured: 
>>>
>>> riak/ 
>>>   common/ 
>>>   ubuntu/ 
>>>   redhat/ 
>>>
>>>
>>> I have a group_by task that runs in a bootstrap role and gives me 
>>> groups based on OS. 
>>>
>>> Then I  apply riak/redhat which should depend on riak/common running 
>>> _afterwards_. 
>>>
>>>
>>> - James 
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Dec 10, 2013 at 12:36 PM, Michael DeHaan 
>>> <mic...@ansibleworks.com> wrote: 
>>> > So basically requires: would have a requires_after: or similar? 
>>> > 
>>> > Can you give an example of the role names so I can better get a feel 
>>> for the 
>>> > use case? 
>>> > 
>>> > Thanks!!! 
>>> > 
>>> > 
>>> > 
>>> > On Tue, Dec 10, 2013 at 11:59 AM, James Martin <jma...@basho.com> 
>>> wrote: 
>>> >> 
>>> >> As it currently stands, role dependencies are executed prior to the 
>>> >> role in which they are defined.  This is a good feature. 
>>> >> 
>>> >> But! 
>>> >> 
>>> >> I'm running into the situation where I have a 'common' role that gets 
>>> >> run after some OS-specific roles -- mainly the OS-specific roles are 
>>> >> doing the package installation and OS specific configurations and the 
>>> >> common role is doing everything that is similar between the 
>>> >> distributions. 
>>> >> 
>>> >> It would be great if I could tell the os-specific role to depend on 
>>> >> the common role, but make the common role execute _after_ the 
>>> >> os-specific role.  Does this idea make sense?  Would it be a useful 
>>> >> feature for others? Or should it be solved in a different way with 
>>> >> re-organizing my roles? 
>>> >> 
>>> >> My current implementation just runs the roles in a specific order -- 
>>> >> without any dependencies.  It works, just wanted to see if there was 
>>> a 
>>> >> way to clean things up. 
>>> >> 
>>> >> 
>>> >> - James 
>>> >> 
>>> >> -- 
>>> >> You received this message because you are subscribed to the Google 
>>> Groups 
>>> >> "Ansible Development" group. 
>>> >> To unsubscribe from this group and stop receiving emails from it, 
>>> send an 
>>> >> email to ansible-deve...@googlegroups.com. 
>>> >> For more options, visit https://groups.google.com/groups/opt_out. 
>>> > 
>>> > 
>>> > 
>>> > 
>>> > -- 
>>> > Michael DeHaan <mic...@ansibleworks.com> 
>>> > CTO, AnsibleWorks, Inc. 
>>> > http://www.ansibleworks.com/ 
>>> > 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to