when "partial" DOES NOT match

I have a task that runs when there is a partial match on the inventory_hostname:

when: ‘“lab” in inventory_hostname’

I need to figure out a way to do the opposite, meaning, when ‘lab’ is not in inventory_hostname the task will run. Any advice?

when: '"lab" not in inventory_hostname'

Giovanni

You can slap me in the back of the head should we ever meet. I can’t believe I didn’t try that.