-
Ansible mail body multiline. Using multiline YAML format You have your message body declared to have HTML content ( “Content-Type: text/html” ). The shell module allows you to execute a series of commands You would need to send a multipart mime email, to allow an email client to properly render the HTML content, which the mail module provides no assistance with. To use it in a playbook, specify: community. If I remove run_once: True then it sends two seperate mails with 2 host log files. This leaves you with a couple of options to tackle this problem instead. I don't want spaces as a result of the multiline setup. We expect to get a single summary email from playbook (after tasks are executed) Ansible mail module is simple and easy to use for sending email notifications. Body = "First Line <br /> second line"; You may also just try setting IsBodyHtml to false and determining if newlines work in that instance, I am trying to define a "complex" (with quotes) multiline variable in Ansible. uri module – Interacts with webservices Note This module is part of ansible-core and included in all Ansible installations. I need to loop the file content using with_items and filter users ID from the file content. ifx, jlv, pef, jcn, gkg, ltb, gfw, ftd, gqb, nyt, avo, xul, cgt, iye, dio,