All,
I am trying to send email in html
I keep getting
TASK: [pre_install | send email] *************************************
fatal: [localhost → 127.0.0.1] => A variable inserted a new parameter into the module args. Be sure to quote variables if they contain equal signs (for example: “{{var}}”).
My commands
-
name: delete temp dir
local_action: file path=./tmp state=absent -
name: template create dir
local_action: file path=./tmp state=directory -
name: template email
local_action: template src=…/files/email_template.j2 dest=./tmp/email.txt -
name: send email
local_action: mail
host=‘smtp3.hp.com’
port=25
subject=“EGIT IIB ENVIRONMENT SETUP”
body=“{{ lookup(‘file’, ‘./tmp/email.txt’) }}”
from="antoine.voiry@gmail.com"
to="antoine.voiry@gmail.com"
cc="antoine.voiry@gmail.com"
headers=“Content-type=text/html”
The ./tmp/email.tx looks as follow
|