---
# ANSIBLE_LOCALHOST_WARNING=false ansible-playbook assert.yml

# /!\ WARNING :
#	This playbook was created to demonstrate a buggy behavior with 'assert'.
#	Don't be inspired by the code below.

- hosts: 127.0.0.1
  connection: local
  gather_facts: no

  vars:
    myVariable: 'hello'

  tasks:

  - assert:
      that:
      - myVariable is defined					# assert OK
      - "{{ myVariable }} is undefined"			# assert OK
      - undefinedVariable is undefined			# assert OK
#      - "{{ undefinedVariable }} is undefined"	# execution error : undefined variable
...
