|
|
@ -69,7 +69,10 @@ class CallbackModule(CallbackBase):
|
|
|
|
if ignore_errors:
|
|
|
|
if ignore_errors:
|
|
|
|
return
|
|
|
|
return
|
|
|
|
sender = '"Ansible: %s" <root>' % host
|
|
|
|
sender = '"Ansible: %s" <root>' % host
|
|
|
|
|
|
|
|
attach = res._task.action
|
|
|
|
|
|
|
|
if 'invocation' in res._result:
|
|
|
|
attach = "%s: %s" % (res._result['invocation']['module_name'], json.dumps(res._result['invocation']['module_args']))
|
|
|
|
attach = "%s: %s" % (res._result['invocation']['module_name'], json.dumps(res._result['invocation']['module_args']))
|
|
|
|
|
|
|
|
|
|
|
|
subject = 'Failed: %s' % attach
|
|
|
|
subject = 'Failed: %s' % attach
|
|
|
|
body = 'The following task failed for host ' + host + ':\n\n%s\n\n' % attach
|
|
|
|
body = 'The following task failed for host ' + host + ':\n\n%s\n\n' % attach
|
|
|
|
|
|
|
|
|
|
|
|