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 'klshxsh-serial_should_be_string' into devel

This commit is contained in:
James Cammarata 2015-10-12 11:29:29 -04:00
commit 424b623c5d
3 changed files with 6 additions and 3 deletions

View file

@ -227,7 +227,10 @@ class PlaybookExecutor:
serial_pct = int(play.serial.replace("%",""))
serial = int((serial_pct/100.0) * len(all_hosts))
else:
serial = int(play.serial)
if play.serial is None:
serial = -1
else:
serial = int(play.serial)
# if the serial count was not specified or is invalid, default to
# a list of all hosts, otherwise split the list of hosts into chunks

View file

@ -300,7 +300,7 @@ class Base:
# if this evaluated to the omit value, set the value back to
# the default specified in the FieldAttribute and move on
if omit_value is not None and value == omit_value:
value = attribute.default
setattr(self, name, attribute.default)
continue
# and make sure the attribute is of the type it should be

View file

@ -87,7 +87,7 @@ class Play(Base, Taggable, Become):
_any_errors_fatal = FieldAttribute(isa='bool', default=False, always_post_validate=True)
_force_handlers = FieldAttribute(isa='bool', always_post_validate=True)
_max_fail_percentage = FieldAttribute(isa='percent', always_post_validate=True)
_serial = FieldAttribute(isa='int', default=0, always_post_validate=True)
_serial = FieldAttribute(isa='string', always_post_validate=True)
_strategy = FieldAttribute(isa='string', default='linear', always_post_validate=True)
# =================================================================================