Try using the native mail module instead of shell: https://docs.ansible.com/ansible/latest/modules/mail_module.html
On Mon, 30 Dec 2019 at 11:36, Karther <[email protected]> wrote: > > Hey !! > > With prompt shell on my linux this command works perfectly : > > mail -a "Content-Type: text/html" -s "Ansible deployment HospitalisV3" > [email protected] > </home/ansible/test_hospi_package/frontoffice/roles/frontoffice/files/mail_content.html > > But when i use this next task, there is error with ansible : > > - name: "Execut command shell with html" > shell: mail -a "Content-Type: text/html" -s "Ansible deployment > HospitalisV3" [email protected] > </home/ansible/test_hospi_package/frontoffice/roles/frontoffice/files/mail_content.html > delegate_to: localhost > > Error is that ansible not understand "Content-Type: text/html" > > Someone can you help me please community Ansible !!! :) > > Best Regards, > > Karther > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/7ba52f7d-52ae-4d23-979a-c071112157f8%40googlegroups.com. -- Dick Visser Trust & Identity Service Operations Manager GÉANT -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwNLoN%3DapO979Mi9XFuYycpNN%2ByrpoAMcNzrMMHxUA%2BayQ%40mail.gmail.com.
