0

How to provide username and password of email account while using ansible mail module. I'm using gmail smtp server. In documentation of mail module nothing is mentioned about it.

I also came across an issue where username and password support was added through commit( maybe..I don't know how it works.). But I couldn't find username and password implementation for smtp in master source code [https:// github.com/ansible/ansible/blob/devel/library/notification/mail.](sorry..don't have enough rep to post 3 links)

2 Answers 2

1

The pull request you found has not (yet) been merged into mainline Ansible. It may be merged at some point in the future, but that is 100% up to the project maintainers.

Until then, you'll need to send SMTP to another host locally that can accept the mail without the need for authentication.

1

There are 2 ways to send email notification in ansible. 1) via the Local Machine 2) via the Remote machine

Using the correct module call is important. Only the remote machine has parameters for username and password setting.

See more: http://wiki.glitchdata.com/index.php?title=Ansible:_Email_Notification

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .