You didn't mention awx or Ansible Automation, so I assume you are using command 
line.

ansible-playbook someplay.yml | sed -n '/PLAY RECAP /,$p' | egrep 'failed=[1-9]'

sed  - only print the lines from "PLAY RECAP " top the end.
egrep - only print lines that contain "failed=" with a non zero first digit.

And then I would add '~~~' at the beginning and the end.

Is that the mark down you are looking for?

Regards,
Stan

From: 'Leandro Montesoro' via Ansible Project <[email protected]>
Sent: Tuesday, September 13, 2022 8:52 AM
To: Ansible Project <[email protected]>
Subject: [EXTERNAL] [ansible-project] Playbook output to markdown?

Hello!

In my organization we have some jobs in jenkins that executes differents 
ansible playbooks to analize things from the differents servers (for example if 
certain services are found installed).
The problem I have, this playbook is running on many servers, and the output is 
not very friendly.
Something that would help me is to be able to show, in markdown for example, 
the final result since the "failed" records give me the indication that 
something is wrong. Is there a way to model the output as markdown? What do you 
suggest for this problem?

[cid:[email protected]]


Thank you very much!
--
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/17d9e52a-35a6-4520-8d9e-e78d33ecd7fan%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/ansible-project/17d9e52a-35a6-4520-8d9e-e78d33ecd7fan*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Fto3Xw!pGlnt6AiM2BIrPa7F-mUYZw3jFJqlkEYOFEkjEMxxvT_2jIrzvmOATrGLHvBtdKlW4DEkYo_CK6sz4TFeUKjrvDsq1oRn9Q$>.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/PH0PR10MB55931CF7C8662E52A0E966CCF0479%40PH0PR10MB5593.namprd10.prod.outlook.com.

Reply via email to