when conditionals syntax

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

`

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

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