mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Fix min_size reference where type is None (#53669)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user