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
5b3b9ba2
Commit
5b3b9ba2
authored
Mar 21, 2014
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addresses #4407 Caculate failed percentage based on serial and number of hosts in play
parent
d0cbb511
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
lib/ansible/playbook/__init__.py
+8
-2
No files found.
lib/ansible/playbook/__init__.py
View file @
5b3b9ba2
...
@@ -674,8 +674,14 @@ class PlayBook(object):
...
@@ -674,8 +674,14 @@ class PlayBook(object):
play
.
max_fail_pct
=
0
play
.
max_fail_pct
=
0
# If threshold for max nodes failed is exceeded , bail out.
# If threshold for max nodes failed is exceeded , bail out.
if
(
hosts_count
-
len
(
host_list
))
>
int
((
play
.
max_fail_pct
)
/
100.0
*
hosts_count
):
if
play
.
serial
>
0
:
host_list
=
None
# if serial is set, we need to shorten the size of host_count
play_count
=
len
(
play
.
_play_hosts
)
if
(
play_count
-
len
(
host_list
))
>
int
((
play
.
max_fail_pct
)
/
100.0
*
play_count
):
host_list
=
None
else
:
if
(
hosts_count
-
len
(
host_list
))
>
int
((
play
.
max_fail_pct
)
/
100.0
*
hosts_count
):
host_list
=
None
# if no hosts remain, drop out
# if no hosts remain, drop out
if
not
host_list
:
if
not
host_list
:
...
...
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