6

My goal is to use a conditional check, on two variables, using the or operator. There are two vars:

var1: test
var2: another

Using one a check on one variable works.

  when: "'te' in var1" # works!

But using two variables is always true.

  when: "'te' in var1 or var2" # True
  when: "'xxx' in var1 or var2" # Also true, but I expect false
  when: "'xxx' in var1" or "'xxx' in var2" # syntax error

What am I doing wrong?

Kevin C
  • 4,851
  • 8
  • 30
  • 64

1 Answers1

10

Got it.

when: "'xxx' in var1 or 'te' in var2" # works
Kevin C
  • 4,851
  • 8
  • 30
  • 64