- debug: var={{item}}
  loop: '{{possible_vars}}'

- assert:
    that:
        - (item in vars and item in defined and vars[item] == defined[item]) or (item not in vars and item not in defined)
  loop: '{{possible_vars}}'
