Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This should set the sender properly. #1315

Merged
merged 1 commit into from
Oct 12, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/callbacks/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import smtplib

def mail(subject='Ansible error mail', sender='root', to='root', cc=None, bcc=None, body=None):
def mail(subject='Ansible error mail', sender='<root>', to='root', cc=None, bcc=None, body=None):
if not body:
body = subject

Expand Down Expand Up @@ -51,7 +51,7 @@ class CallbackModule(object):
def runner_on_failed(self, host, res, ignore_errors=False):
if ignore_errors:
return
sender = 'Ansible error on %s' % host
sender = 'Ansible error on %s <root>' % host
subject = 'Failure: %s' % res['msg'].split('\n')[0]
mail(sender=sender, subject=subject,
body='''The following task failed for host %s:
Expand Down