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:
parent
33939f7fe8
commit
acdb4c3ede
2 changed files with 4 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- ec2_asg - Fix scenario where min_size can end up passing None type to boto
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue