Merge pull request #13454 from qduxiaoliang/issue
quit plays with an error if there were failed tasks and handler execu…
This commit is contained in:
commit
64148a84ca
1 changed files with 5 additions and 0 deletions
|
@ -826,6 +826,11 @@ class PlayBook(object):
|
||||||
# if there were failed tasks and handler execution
|
# if there were failed tasks and handler execution
|
||||||
# is not forced, quit the play with an error
|
# is not forced, quit the play with an error
|
||||||
return False
|
return False
|
||||||
|
elif task_errors:
|
||||||
|
# if there were failed tasks and handler execution is forced,
|
||||||
|
# execute all handlers and quit the play with an error
|
||||||
|
self.run_handlers(play)
|
||||||
|
return False
|
||||||
else:
|
else:
|
||||||
# no errors, go ahead and execute all handlers
|
# no errors, go ahead and execute all handlers
|
||||||
if not self.run_handlers(play):
|
if not self.run_handlers(play):
|
||||||
|
|
Loading…
Reference in a new issue