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
2d90cbf7
Commit
2d90cbf7
authored
Jul 28, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly fail results with rc != 0
Fixes #11769
parent
787a0c4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lib/ansible/executor/task_executor.py
+6
-3
No files found.
lib/ansible/executor/task_executor.py
View file @
2d90cbf7
...
...
@@ -327,9 +327,12 @@ class TaskExecutor:
result
[
'failed_when_result'
]
=
result
[
'failed'
]
=
failed_when_result
if
failed_when_result
:
break
elif
'failed'
not
in
result
and
result
.
get
(
'rc'
,
0
)
==
0
:
# if the result is not failed, stop trying
break
elif
'failed'
not
in
result
:
if
result
.
get
(
'rc'
,
0
)
!=
0
:
result
[
'failed'
]
=
True
else
:
# if the result is not failed, stop trying
break
if
attempt
<
retries
-
1
:
time
.
sleep
(
delay
)
...
...
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