summaryrefslogtreecommitdiff
path: root/notification/mail.py
diff options
context:
space:
mode:
authorBen Copeland <ben.copeland@linaro.org>2015-03-20 11:11:43 +0000
committerBen Copeland <ben.copeland@linaro.org>2015-03-20 11:11:43 +0000
commitb01c2cee66d720cf2f503052d5275bdff06a2f32 (patch)
treebe8799154573a142f2e56cb1af30bd3008c18d05 /notification/mail.py
parent57be6d7ac4a90222c35d2b818b178d024e010c18 (diff)
downloadansible-modules-extras-b01c2cee66d720cf2f503052d5275bdff06a2f32.tar.gz
Added example block for the "SMTP username and password"
Diffstat (limited to 'notification/mail.py')
-rw-r--r--notification/mail.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/notification/mail.py b/notification/mail.py
index aa3345b4..92565016 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 <john.smith@example.com>"
+ 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'