Hello -

Can the conditional "OR" operator be syntactically indented similar to the 
"AND" operator?

"AND" can be written in either of these ways: 
Source 
<http://stackoverflow.com/questions/34867533/ansible-when-condition-not-working-with-logical-and-operator>

> when: django_migration_result|changed and ('Applying auth.0001_initial... OK' 
> in django_migration_result.stdout)
>
> or

> when:
> - django_migration_result | changed 
>  - 'Applying auth.0001_initial... OK' in django_migration_result.stdout 


"OR" can be written as:

>   failed_when: expect_output.stdout | search("(ORA|SP2)-[0-9]+") or 
> expect_output.stdout | search("Usage")

but I can't get the below attempt to work.

>   failed_when: 
>     - expect_output.stdout | search("(ORA|SP2)-[0-9]+") or
>     - expect_output.stdout | search("Usage")



Thoughts? 

-- 
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/bfc2021e-a4c7-4593-8dff-9075739d9601%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to