Logical 'OR' in when statement?

51 views
Skip to first unread message

John Oliver

unread,
Aug 14, 2014, 1:32:59 PM8/14/14
to ansible...@googlegroups.com
Can I execute an action when variable1=x OR variable2=y?

Michael DeHaan

unread,
Aug 14, 2014, 1:51:49 PM8/14/14
to ansible...@googlegroups.com
Yep!

    - shell: echo hi
      when: variable1 == x and variable2 == y



On Thu, Aug 14, 2014 at 1:32 PM, John Oliver <jno...@gmail.com> wrote:
Can I execute an action when variable1=x OR variable2=y?

--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/20c1b604-4ed9-429d-874c-316fe07bc1e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages