On Tuesday, January 30, 2018 at 9:23:29 AM UTC-7, Matt Martz wrote:
>
> Yes, you use of `| "yes"` is not proper jinja2.
>
> `|` is used to "pipe" something into a filter function, and "yes" is not a 
> filter function.
>
> Are you trying to check if it also "yes".  Look to using the bool filter 
> (also use `and` instead of `&&`):
>
> ```
> when: install|default(false)|bool and nagios_user is failed
> ```
>
> On Tue, Jan 30, 2018 at 10:16 AM, John Harmon <[email protected] 
> <javascript:>> wrote:
>
>> Is something wrong with the following?  It seems to get executed no 
>> matter what.  In addition, where can I find more information about this 
>> syntax?  Is this considered jinja2 syntax? or something else?
>>
>> - include_tasks: install.yml
>>   when: ( install|default(false)|lower = "true" | "yes" ) && nagios_user|
>> failed
>>
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/299aec3f-6321-4839-83fb-e0ba083be6a6%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/299aec3f-6321-4839-83fb-e0ba083be6a6%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Matt Martz
> @sivel
> sivel.net
>

Thanks Matt.  Works perfectly.  I will have to go and look up some jinja2 
documentation.  Thanks again! 

-- 
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/9b3b3477-790e-4f08-9e4b-290ca396ed61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to