summaryrefslogtreecommitdiff
path: root/notification/mail.py
diff options
context:
space:
mode:
authorMatt Jaynes <matt@nanobeep.com>2015-04-22 21:14:47 +0200
committerMatt Jaynes <matt@nanobeep.com>2015-04-22 21:14:47 +0200
commita56c8ebff19a1c6ccc1d801e04e344cae6322b0a (patch)
tree448f8a160875c5b0c2d88925c24cdf2e35c1d215 /notification/mail.py
parent3148aafa17c64b002693dc3f41216a87b4456b83 (diff)
downloadansible-modules-extras-a56c8ebff19a1c6ccc1d801e04e344cae6322b0a.tar.gz
Document 'msg' param and fix examples
The 'msg' alias for 'subject' isn't in the documentation, so adding it. In the gmail example, it uses both the 'subject' and 'msg' params, but 'msg' is an alias of 'subject', so you are essentially declaring the same param twice. If you use this example, then no subject is sent (I tested with gmail). Documentation example is updated to use 'body' as intended. Also, updated the simple example to use 'subject' instead of the 'msg' alias since it is more explicit.
Diffstat (limited to 'notification/mail.py')
-rw-r--r--notification/mail.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/notification/mail.py b/notification/mail.py
index a1ec4408..10ef61ef 100644
--- a/notification/mail.py
+++ b/notification/mail.py
@@ -61,7 +61,7 @@ options:
required: false
subject:
description:
- - The subject of the email being sent.
+ - The subject of the email being sent. Alias: I(msg)
aliases: [ msg ]
required: true
body:
@@ -115,7 +115,7 @@ options:
EXAMPLES = '''
# Example playbook sending mail to root
-- local_action: mail msg='System {{ ansible_hostname }} has been successfully provisioned.'
+- local_action: mail subject='System {{ ansible_hostname }} has been successfully provisioned.'
# Sending an e-mail using Gmail SMTP servers
- local_action: mail
@@ -125,7 +125,7 @@ EXAMPLES = '''
password='mysecret'
to="John Smith <john.smith@example.com>"
subject='Ansible-report'
- msg='System {{ ansible_hostname }} has been successfully provisioned.'
+ body='System {{ ansible_hostname }} has been successfully provisioned.'
# Send e-mail to a bunch of users, attaching files
- local_action: mail