ansible 2.0.2 check if a variable contain a specific value

i want to check if {{variable1}} contain a specific word for example i want to check if this variable contain the word “SNAPSHOT” or “RELEASE”. is there a command can do that ?

thank you in advance .

when: “‘SNAPSHOT’ in variable1 or ‘RELEASE’ in variable1”