I am running a task which i only want to execute if the value of a variable that i have previously set does not exist in another variable. I have tried the following but it errors with a templating error:
name: get ip address
...
register: ipaddress
name: check cluster
....
register: topology
name: do my task
...
when: not topology is search(ipaddress)
Is there any way in ansible to accomplish what i am doing? I'm using version 2.6.