--- - import_playbook: test.yml - hosts: localhost connection: local tasks: - name: Fail if any tests failed fail: msg: > Test failures: {{ test_failures }} when: test_failures is defined