--- - name: Test for when (failure) hosts: localhost gather_facts: false tasks: - name: Testing for when is passed a list ansible.builtin.debug: msg: "this is ok" when: - true - 123