Also, this is not an inheritance model.  This is a dependency model.



On Mon, Jul 28, 2014 at 10:06 AM, Michael DeHaan <[email protected]>
wrote:

> The "when" conditional is properly being applied to both tasks in this
> scenario, by design.
>
> This seems like the most logical behavior, because the parent role has
> decided to not be included, so the dependencies should have the same
> conditions.
>
>
>
>
> On Mon, Jul 28, 2014 at 1:03 AM, John Anderson <[email protected]> wrote:
>
>> So if I have a role with this as their meta:
>>
>>
>> dependencies:
>>   - { role: pythonapp, when: is_legacy is not defined }
>>   - { role: rubyapp, when: is_legacy is defined }
>>
>>
>> If pythonapp and rubyapp share a common dependency like the role "dbaccess" 
>> then when pythonapp gets skipped, it currently sets the dbaccess role to be 
>> skipped even though rubyapp depends on it.   The only way I have been able 
>> to fix this is by setting `allow_duplicates: yes` on all roles that may be 
>> inherited by both but this makes the runtime of my playbooks pretty slow 
>> because its re-running a bunch of tasks.
>>
>>
>> Is there a way I could get this inheritance model to work where the dbaccess 
>> role doesn't get skipped if the role running it does depend on it?
>>
>>
>>
>>  --
>> 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/7ed0e1a6-9bc8-4e71-8fdf-316c0d714b80%40googlegroups.com
>> <https://groups.google.com/d/msgid/ansible-project/7ed0e1a6-9bc8-4e71-8fdf-316c0d714b80%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/CA%2BnsWgxOYMA3AwuBEgd3%2BK_iDo%2Bbp%3DpsCqj6uUioMbsTDM-8qQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to