diff options
author | Dag Wieers <dag@wieers.com> | 2012-10-12 19:54:34 +0200 |
---|---|---|
committer | Dag Wieers <dag@wieers.com> | 2012-10-12 20:40:06 +0200 |
commit | de34c7c1335faa5f3ba5457ef5ebd976b35eb4b6 (patch) | |
tree | 3f0f0149d50cd699da74dfb2da6a6048ba9ca209 /plugins | |
parent | dfaef8061a506a5575bad2274bed6b425f4913c1 (diff) | |
download | ansible-de34c7c1335faa5f3ba5457ef5ebd976b35eb4b6.tar.gz |
This should set the sender properly.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/callbacks/mail.py | 4 |
1 files 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='<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: |