1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge branch 'kavink-devel' into devel

This commit is contained in:
James Cammarata 2013-09-09 10:22:03 -05:00
commit 150dd230cc
2 changed files with 3 additions and 2 deletions

View file

@ -573,8 +573,9 @@ class PlayBook(object):
host_list = self._list_available_hosts(play.hosts)
# Set max_fail_pct to 0, So if any hosts fails, bail out
if task.any_errors_fatal and len(host_list) < hosts_count:
host_list = None
play.max_fail_pct = 0
# 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):

View file

@ -111,7 +111,7 @@ class Play(object):
self.transport = ds.get('connection', self.playbook.transport)
self.gather_facts = ds.get('gather_facts', None)
self.remote_port = self.remote_port
self.any_errors_fatal = ds.get('any_errors_fatal', False)
self.any_errors_fatal = utils.boolean(ds.get('any_errors_fatal', 'false'))
self.accelerate = utils.boolean(ds.get('accelerate', 'false'))
self.accelerate_port = ds.get('accelerate_port', None)
self.max_fail_pct = int(ds.get('max_fail_percentage', 100))