Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
3a8dc230
Commit
3a8dc230
authored
Oct 12, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1315 from dagwieers/mail-callback-improvement
This should set the sender properly.
parents
a82522a5
de34c7c1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
plugins/callbacks/mail.py
+2
-2
No files found.
plugins/callbacks/mail.py
View file @
3a8dc230
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
import
smtplib
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
:
if
not
body
:
body
=
subject
body
=
subject
...
@@ -51,7 +51,7 @@ class CallbackModule(object):
...
@@ -51,7 +51,7 @@ class CallbackModule(object):
def
runner_on_failed
(
self
,
host
,
res
,
ignore_errors
=
False
):
def
runner_on_failed
(
self
,
host
,
res
,
ignore_errors
=
False
):
if
ignore_errors
:
if
ignore_errors
:
return
return
sender
=
'Ansible error on
%
s'
%
host
sender
=
'Ansible error on
%
s
<root>
'
%
host
subject
=
'Failure:
%
s'
%
res
[
'msg'
]
.
split
(
'
\n
'
)[
0
]
subject
=
'Failure:
%
s'
%
res
[
'msg'
]
.
split
(
'
\n
'
)[
0
]
mail
(
sender
=
sender
,
subject
=
subject
,
mail
(
sender
=
sender
,
subject
=
subject
,
body
=
'''The following task failed for host
%
s:
body
=
'''The following task failed for host
%
s:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment