On Monday, 27 August 2018 13.40.48 CEST Saravanan wrote: > All, > In the below Ansible email task, instead of attaching the csv file to the > email, need to send the contend of csv file in the body of the email as > html table.
I'm not sure what you are trying too achieve but you should probably check at ARA https://github.com/openstack/ara > > - name: Send the SSH status to email > local_action: mail > host= '127.0.0.1' > port=25 > subject="SSH Connection status for Unix sudo accounts" > body="SSH Failure Service accounts" > attach="/tmp/content.csv" > from="[email protected]" > to="[email protected] <[email protected]>" > subtype="html" > charset=utf8 > delegate_to: 127.0.0.1 > run_once: true What you are trying to do is possible but you need to go through a lot of hoops, choosing csv is making this harder that is could be, yaml or json would have been easier. As is, you would need to create the csv file to a list of list, then use template to create the html table. -- Kai Stian Olstad -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2469285.011buo1xgf%40x1. For more options, visit https://groups.google.com/d/optout.
