I think I get what you're saying and I might go that route for now but it 
still gives us to limited dependencies functionality instead of being able 
to include thing with loops. Unless I misunderstood.

If I have role A and B, would I just make a role C with dependencies being 
[A,B] in order to control the order that way?

On Wednesday, July 20, 2016 at 5:26:09 AM UTC-7, J Hawkesworth wrote:
>
> Someone mentioned a while back (here I think) a way to get dependent roles 
> to run after roles is to create a wrapper role that references your 
> dependent role - no tasks in it, just a meta/main.yml to point at the role 
> that you want to run.  
> Not a trick I have tried myself but it sounds like you could use that to 
> run your upstart role later in your plays.
> Hope this helps,
> Jon
>
> On Tuesday, July 19, 2016 at 11:15:05 PM UTC+1, Dmitry Makovey wrote:
>>
>> I believe in the past similar topic came up and it was more of a 
>> philosophical issue (my memory could be wrong though)
>>
>>
>> On Monday, July 18, 2016 at 10:22:23 AM UTC-7, Lorenzo Pisani wrote:
>>>
>>> Yeah I know you can loop over includes. And that's why I would like to 
>>> use it for including roles. Currently it doesn't seem possible to do with 
>>> dependencies.
>>>
>>> Any reason you think this wouldn't be implemented? Is it a technical 
>>> limitation or philosophical?
>>>
>>> On Monday, July 18, 2016 at 8:31:31 AM UTC-7, Dmitry Makovey wrote:
>>>>
>>>> Don'g believe it is possible nor do I think it will be implemented. 
>>>> Currently you can get close approximation by using dependencies: 
>>>> http://docs.ansible.com/ansible/playbooks_roles.html#role-dependencies
>>>>
>>>>
>>>> as far as looping over includes:
>>>>
>>>> =====> test.yml 
>>>> --- 
>>>>  
>>>> - hosts: all 
>>>>   tasks: 
>>>>       - name: Ping-pong 
>>>>         ping: 
>>>>       - { include: "{{ item }}.yml", with_items: [ ping, pong ]} 
>>>> =====> ping.yml 
>>>> - name: Ping 
>>>>   ping: 
>>>> =====> pong.yml 
>>>> - name: Pong 
>>>>   ping:
>>>>
>>>>
>>>> which works as expected - first pings then pongs servers in inventory. 
>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e2db02fd-86d8-41a3-af10-ef42f2aa59d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to