From 4a5e52b2d2e59ba61144baaf93a33b1c44b0ae3f Mon Sep 17 00:00:00 2001 From: klshxsh <@klshxsh> Date: Fri, 9 Oct 2015 21:34:37 +0100 Subject: [PATCH 1/2] The serial keyword can be specified as a percentage, e.g '30%' or a number e.g. '3'; therefore it needs to be a string to allow both types --- lib/ansible/playbook/play.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 9d1959c1e5..a017ac4a71 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -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', default='0', always_post_validate=True) _strategy = FieldAttribute(isa='string', default='linear', always_post_validate=True) # ================================================================================= From ac00c9ced7f05c087f5465224e22eed8e6978d5e Mon Sep 17 00:00:00 2001 From: klshxsh Date: Mon, 12 Oct 2015 12:41:00 +0100 Subject: [PATCH 2/2] changed 'string' to 'percent' for _serial Note that this allows both integers (e.g. 3) and percentages (e.g. "30%") Also changed default back to 0 rather than '0' --- lib/ansible/playbook/play.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index a017ac4a71..a24eb133cc 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -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='string', default='0', always_post_validate=True) + _serial = FieldAttribute(isa='percent', default=0, always_post_validate=True) _strategy = FieldAttribute(isa='string', default='linear', always_post_validate=True) # =================================================================================