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

Use post_validated play for serial calculations in TQM

Fixes #17185
This commit is contained in:
James Cammarata 2016-08-25 17:50:22 -05:00
parent 0a39700b36
commit e375bfd6a5

View file

@ -224,10 +224,10 @@ class TaskQueueManager:
num_hosts = len(self._inventory.get_hosts(new_play.hosts)) num_hosts = len(self._inventory.get_hosts(new_play.hosts))
max_serial = 0 max_serial = 0
if play.serial: if new_play.serial:
# the play has not been post_validated here, so we may need # the play has not been post_validated here, so we may need
# to convert the scalar value to a list at this point # to convert the scalar value to a list at this point
serial_items = play.serial serial_items = new_play.serial
if not isinstance(serial_items, list): if not isinstance(serial_items, list):
serial_items = [serial_items] serial_items = [serial_items]
max_serial = max([pct_to_int(x, num_hosts) for x in serial_items]) max_serial = max([pct_to_int(x, num_hosts) for x in serial_items])