Commit de34c7c1 by Dag Wieers

This should set the sender properly.

parent dfaef806
......@@ -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
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment