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

Fix min_size reference where type is None (#53669)

This commit is contained in:
Jason Witkowski 2019-03-12 21:31:03 -04:00 committed by ansibot
parent 33939f7fe8
commit acdb4c3ede
2 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- ec2_asg - Fix scenario where min_size can end up passing None type to boto

View file

@ -1488,6 +1488,8 @@ def terminate_batch(connection, replace_instances, initial_instances, leftovers=
if num_new_inst_needed == 0:
decrement_capacity = True
if as_group['MinSize'] != min_size:
if min_size is None:
min_size = as_group['MinSize']
updated_params = dict(AutoScalingGroupName=as_group['AutoScalingGroupName'], MinSize=min_size)
update_asg(connection, **updated_params)
module.debug("Updating minimum size back to original of %s" % min_size)