I want to send email with content from .yml file output.
I've created a Jenkins job using groovy script and inside groovy I'm using shell script to call .yml file and inside I'm checking the url's health check using Ansible's URI module.
Output on the Jenkins console of .yml file display with key words as "Item", "msg", "Status/Status/Code" and "url" and some values against "Item", "msg", "Status/Status/Code" and "url".
I want to read these output of the .yml file and send to email in HTML format. In HTML page header/column of the email will be like below:
URL Status_Code MSG
https://example.com 200,301 Ok
https://example1.com -1
'Status code was not [200, 301]: Request failed: <urlopen error [Errno 111] Connection refused>', u'redirected'
NOTE: Here values against URL, Status_Code and MSG are being displayed on Jenkins console as .yml file's output.
Please guide and suggest as I'm new to Ansible.
Thanks & Regards Ram