From d0afdd0f5def49b0743733c017edc8a86a30a89b Mon Sep 17 00:00:00 2001 From: dhutty Date: Tue, 12 May 2015 12:43:33 -0400 Subject: [PATCH] Additional example, not using local_action --- lib/ansible/modules/extras/notification/mail.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/ansible/modules/extras/notification/mail.py b/lib/ansible/modules/extras/notification/mail.py index ae33c5ca4ca..6dc3da533e6 100644 --- a/lib/ansible/modules/extras/notification/mail.py +++ b/lib/ansible/modules/extras/notification/mail.py @@ -138,6 +138,13 @@ EXAMPLES = ''' attach="/etc/group /tmp/pavatar2.png" headers=Reply-To=john@example.com|X-Special="Something or other" charset=utf8 +# Sending an e-mail using the remote machine, not the Ansible controller node +- mail: + host='localhost' + port=25 + to="John Smith " + subject='Ansible-report' + body='System {{ ansible_hostname }} has been successfully provisioned.' ''' import os