Thanks for your help Dick !! :)

But i try this module mail and the module in documentation Ansible but it's 
not works :
The error is :

An exception occurred during task execution. To see the full traceback, use 
-vvv. The error was: socket.error: [Errno 101] Network is unreachable

It's for that i use commande mail and not module of ansible ...

Thanks for your help community ansible !! ^_^

Regards,

Karther

Le lundi 30 décembre 2019 11:50:35 UTC+1, Dick Visser a écrit :
>
> 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] <javascript:>> 
> wrote: 
> > 
> > Hey !! 
> > 
> > With prompt shell on my linux this command works perfectly : 
> > 
> > mail -a "Content-Type: text/html" -s "Ansible deployment HospitalisV3" 
> [email protected] <javascript:> 
> </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] <javascript:> 
> </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] <javascript:>. 
> > 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/4fc2b628-049f-4abc-8e04-4f141099be24%40googlegroups.com.

Reply via email to