How to manage ansible-playbook output in jenkins.

Hi!

I have a Jenkins job running an ansible playbook. I need to extract and analyze the console output to make a report (csv for example) of the “PLAY RECAP” part where I am interested in collecting the failed records “failed=1”. What is the best way to make it?

Regards!