How to make ansible email body break in lines and large font

You can use html using the parameter subtype: html and your body must have html

  - name: Sending an e-mail using the remote machine
    mail:
      host: localhost
      port: 25
      from:
      to:
      subject: Reports
      body:
        <h1>Hi,</h1>
        <p style="color:red">Hope you are doing well.</p>
        <strong>Thanks,</strong>
        <p style="color:green">Megha</p>
      attach:
        -  file.csv
        -  file.scv

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top