From b01c2cee66d720cf2f503052d5275bdff06a2f32 Mon Sep 17 00:00:00 2001 From: Ben Copeland Date: Fri, 20 Mar 2015 11:11:43 +0000 Subject: [PATCH] Added example block for the "SMTP username and password" --- notification/mail.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/notification/mail.py b/notification/mail.py index aa3345b4f98..92565016ad8 100644 --- a/notification/mail.py +++ b/notification/mail.py @@ -116,6 +116,16 @@ EXAMPLES = ''' # Example playbook sending mail to root - local_action: mail msg='System {{ ansible_hostname }} has been successfully provisioned.' +# Sending an e-mail using Gmail SMTP servers +- local_action: mail + host='smtp.gmail.com' + port=587 + username=username@gmail.com + password='mysecret' + to="John Smith " + subject='Ansible-report' + msg='System {{ ansible_hostname }} has been successfully provisioned.' + # Send e-mail to a bunch of users, attaching files - local_action: mail host='127.0.0.1'