Addresses #4407 Caculate failed percentage based on serial and number of hosts in play

pull/5910/merge
James Tanner 11 years ago
parent d0cbb51170
commit 5b3b9ba267

@ -674,6 +674,12 @@ 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 play.serial > 0:
# 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): if (hosts_count - len(host_list)) > int((play.max_fail_pct)/100.0 * hosts_count):
host_list = None host_list = None

Loading…
Cancel
Save