From de34c7c1335faa5f3ba5457ef5ebd976b35eb4b6 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Fri, 12 Oct 2012 19:54:34 +0200 Subject: [PATCH] This should set the sender properly. --- plugins/callbacks/mail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/callbacks/mail.py b/plugins/callbacks/mail.py index 9eed12b93a..7d9916a0cf 100644 --- a/plugins/callbacks/mail.py +++ b/plugins/callbacks/mail.py @@ -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='', 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 ' % host subject = 'Failure: %s' % res['msg'].split('\n')[0] mail(sender=sender, subject=subject, body='''The following task failed for host %s: