If they are actual booleans already (and not a string value like 'yes' 'no'
or 'true') then you don't need to use the bool filter at all and it can be
simplified to:

when: var1 and var2 or not var3

Regarding the logic, what does debug say the variable values are before the
task you're using them in with the when statement above?



On Mon, Jun 30, 2014 at 8:50 PM, Igor Cicimov <
[email protected]> wrote:

> Hi guys,
>
> Simple question ... given that the vars below are boolean type with values
> of true or false, does this condition make sense?
>
> when: (var1 | bool and var2 | bool) or not var3 | bool
>
> Although I would expect to work (based on what I can see in jinja2
> reference) I'm not seeing the desired result so hence the question.
>
> Thanks
>
> --
> 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/cdc66b02-9d7f-4d46-b7bf-aeb194e99994%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/cdc66b02-9d7f-4d46-b7bf-aeb194e99994%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/CAMFyvFieA9Zev1P-umgL6_bAvO-%3DT6ZV2d_5MPPaev0y%2ByNdnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to