Added example block for the "SMTP username and password"

This commit is contained in:
Ben Copeland 2015-03-20 11:11:43 +00:00 committed by Matt Clay
parent 3d93d22e54
commit 770bf6b35f

View file

@ -117,6 +117,16 @@ EXAMPLES = '''
# Example playbook sending mail to root # Example playbook sending mail to root
- local_action: mail msg='System {{ ansible_hostname }} has been successfully provisioned.' - 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 # Send e-mail to a bunch of users, attaching files
- local_action: mail - local_action: mail
host='127.0.0.1' host='127.0.0.1'