On Tue, Jun 14, 2022 at 10:27 PM Anirban Das <[email protected]>
wrote:

> I need a help to create a playbook for pre-patching notification email. I
> have given sample set of info which should be in subject line. Also, to,cc
> would be changeable according to App Name.
>
> Can anyone pls guide how to set up all those things
>

Take a look at
https://docs.ansible.com/ansible/latest/collections/community/general/mail_module.html
community.general.mail. It's 2022, so you shouldn't just try email from
localhost, but get a proper mail server and authenticate. There's resources
out there on how to integrate a gmail server.

As far as templating goes, either bring in a template with "{{
lookup('template', 'mytemplate.yml' }}" or simple inline templating will do
for the body and subject.

Hugo F. Gonzalez

Automation Architect, Solutions & Technology Practices LATAM

Red Hat Services  <https://www.redhat.com/>

[email protected]
M: +52-5531490291
<https://www.redhat.com/>

Need help from STP Latam? Open your request here
<https://docs.google.com/forms/d/e/1FAIpQLSfEVTfBWbvzBYv2Mx6Ye-LK5SRn0ZZ9ZCqfrYjHRJLK674WHQ/viewform?vc=0&c=0&w=1>



>
> --
> 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/b5a67053-01f7-4044-998a-63bbc0f675c8n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/b5a67053-01f7-4044-998a-63bbc0f675c8n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAH_36tqhkHD9K%3D7rnVCzJLh%2BeBKL1mbWZ2tZ8WkN23PuXMbM9A%40mail.gmail.com.

Reply via email to