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]> 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]. > 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/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 -- 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/CAD8N0v8CqV1Vi8uJJgyj_K9QGYkvOu_SuyjCZxfbE0ZwGYSf8g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
