Merge branch 'klshxsh-serial_should_be_string' into devel
This commit is contained in:
commit
424b623c5d
3 changed files with 6 additions and 3 deletions
lib/ansible
|
@ -227,7 +227,10 @@ class PlaybookExecutor:
|
||||||
serial_pct = int(play.serial.replace("%",""))
|
serial_pct = int(play.serial.replace("%",""))
|
||||||
serial = int((serial_pct/100.0) * len(all_hosts))
|
serial = int((serial_pct/100.0) * len(all_hosts))
|
||||||
else:
|
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
|
# 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
|
# a list of all hosts, otherwise split the list of hosts into chunks
|
||||||
|
|
|
@ -300,7 +300,7 @@ class Base:
|
||||||
# if this evaluated to the omit value, set the value back to
|
# if this evaluated to the omit value, set the value back to
|
||||||
# the default specified in the FieldAttribute and move on
|
# the default specified in the FieldAttribute and move on
|
||||||
if omit_value is not None and value == omit_value:
|
if omit_value is not None and value == omit_value:
|
||||||
value = attribute.default
|
setattr(self, name, attribute.default)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# and make sure the attribute is of the type it should be
|
# and make sure the attribute is of the type it should be
|
||||||
|
|
|
@ -87,7 +87,7 @@ class Play(Base, Taggable, Become):
|
||||||
_any_errors_fatal = FieldAttribute(isa='bool', default=False, always_post_validate=True)
|
_any_errors_fatal = FieldAttribute(isa='bool', default=False, always_post_validate=True)
|
||||||
_force_handlers = FieldAttribute(isa='bool', always_post_validate=True)
|
_force_handlers = FieldAttribute(isa='bool', always_post_validate=True)
|
||||||
_max_fail_percentage = FieldAttribute(isa='percent', 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)
|
_strategy = FieldAttribute(isa='string', default='linear', always_post_validate=True)
|
||||||
|
|
||||||
# =================================================================================
|
# =================================================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue