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
605156c9
Commit
605156c9
authored
Mar 25, 2014
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes premature handler execution after adding force-handlers
parent
d545b73c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
lib/ansible/playbook/__init__.py
+10
-7
No files found.
lib/ansible/playbook/__init__.py
View file @
605156c9
...
...
@@ -601,6 +601,7 @@ class PlayBook(object):
play_hosts
.
append
(
all_hosts
.
pop
())
serialized_batch
.
append
(
play_hosts
)
task_errors
=
False
for
on_hosts
in
serialized_batch
:
# restrict the play to just the hosts we have in our on_hosts block that are
...
...
@@ -657,16 +658,18 @@ class PlayBook(object):
# if no hosts remain, drop out
if
not
host_list
:
if
self
.
force_handlers
:
if
not
self
.
run_handlers
(
play
):
return
False
task_errors
==
True
break
else
:
self
.
callbacks
.
on_no_hosts_remaining
()
return
False
else
:
self
.
inventory
.
lift_also_restriction
()
if
not
self
.
run_handlers
(
play
):
return
False
if
task_errors
and
not
self
.
force_handlers
:
return
False
else
:
self
.
inventory
.
lift_also_restriction
()
if
not
self
.
run_handlers
(
play
):
return
False
return
True
...
...
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