# These tasks should run after as test that fails
- name: Read test.log on test environment
shell: "cat {{remote_artifacts}}/test.log"
register: test_log
- name: Check for FAIL on test.log on test environment
fail: msg="Could not find FAIL on test log"
when: test_log.stdout.find("FAIL") == -1
# We should fail when we can not find FAIL string on log
# -1 means string not found