|
|
@ -1497,7 +1497,7 @@ def get_instances_by_launch_config(props, lc_check, initial_instances):
|
|
|
|
# Check if migrating from launch_template to launch_config first
|
|
|
|
# Check if migrating from launch_template to launch_config first
|
|
|
|
if 'launch_template' in props['instance_facts'][i]:
|
|
|
|
if 'launch_template' in props['instance_facts'][i]:
|
|
|
|
old_instances.append(i)
|
|
|
|
old_instances.append(i)
|
|
|
|
elif props['instance_facts'][i]['launch_config_name'] == props['launch_config_name']:
|
|
|
|
elif props['instance_facts'][i].get('launch_config_name') == props['launch_config_name']:
|
|
|
|
new_instances.append(i)
|
|
|
|
new_instances.append(i)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
old_instances.append(i)
|
|
|
|
old_instances.append(i)
|
|
|
@ -1524,7 +1524,7 @@ def get_instances_by_launch_template(props, lt_check, initial_instances):
|
|
|
|
# Check if migrating from launch_config_name to launch_template_name first
|
|
|
|
# Check if migrating from launch_config_name to launch_template_name first
|
|
|
|
if 'launch_config_name' in props['instance_facts'][i]:
|
|
|
|
if 'launch_config_name' in props['instance_facts'][i]:
|
|
|
|
old_instances.append(i)
|
|
|
|
old_instances.append(i)
|
|
|
|
elif props['instance_facts'][i]['launch_template'] == props['launch_template']:
|
|
|
|
elif props['instance_facts'][i].get('launch_template') == props['launch_template']:
|
|
|
|
new_instances.append(i)
|
|
|
|
new_instances.append(i)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
old_instances.append(i)
|
|
|
|
old_instances.append(i)
|
|
|
|