--- - hosts: localhost gather_facts: no tasks: - debug: msg: "{{ inhalt }}" when: inhalt|default(False) - debug: msg: "Variable nicht definiert" when: inhalt is not defined - debug: msg: - "inhalt|default(False) → {{ inhalt|default(False) }} → {{ inhalt|default(False)|bool }}" - "inhalt is not defined → {{ inhalt is not defined }} → {{ inhalt is not defined|bool }}"