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
dc41bb80
Commit
dc41bb80
authored
Nov 12, 2013
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge pull request #4207 from ashorin/ansible
Fail playbook when serial is set and hadlers fail on set.
parent
f0afb20c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
lib/ansible/playbook/__init__.py
+11
-0
No files found.
lib/ansible/playbook/__init__.py
View file @
dc41bb80
...
...
@@ -544,12 +544,23 @@ class PlayBook(object):
for
handler
in
play
.
handlers
():
if
len
(
handler
.
notified_by
)
>
0
:
self
.
inventory
.
restrict_to
(
handler
.
notified_by
)
# Resolve the variables first
handler_name
=
template
(
play
.
basedir
,
handler
.
name
,
handler
.
module_vars
)
if
handler_name
not
in
fired_names
:
self
.
_run_task
(
play
,
handler
,
True
)
# prevent duplicate handler includes from running more than once
fired_names
[
handler_name
]
=
1
host_list
=
self
.
_list_available_hosts
(
play
.
hosts
)
if
handler
.
any_errors_fatal
and
len
(
host_list
)
<
hosts_count
:
play
.
max_fail_pct
=
0
if
(
hosts_count
-
len
(
host_list
))
>
int
((
play
.
max_fail_pct
)
/
100.0
*
hosts_count
):
host_list
=
None
if
not
host_list
:
self
.
callbacks
.
on_no_hosts_remaining
()
return
False
self
.
inventory
.
lift_restriction
()
new_list
=
handler
.
notified_by
[:]
for
host
in
handler
.
notified_by
:
...
...
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