|
|
@ -629,10 +629,13 @@ def get_properties(autoscaling_group):
|
|
|
|
instance_facts[i['InstanceId']] = {'health_status': i['HealthStatus'],
|
|
|
|
instance_facts[i['InstanceId']] = {'health_status': i['HealthStatus'],
|
|
|
|
'lifecycle_state': i['LifecycleState'],
|
|
|
|
'lifecycle_state': i['LifecycleState'],
|
|
|
|
'launch_config_name': i['LaunchConfigurationName']}
|
|
|
|
'launch_config_name': i['LaunchConfigurationName']}
|
|
|
|
else:
|
|
|
|
elif i.get('LaunchTemplate'):
|
|
|
|
instance_facts[i['InstanceId']] = {'health_status': i['HealthStatus'],
|
|
|
|
instance_facts[i['InstanceId']] = {'health_status': i['HealthStatus'],
|
|
|
|
'lifecycle_state': i['LifecycleState'],
|
|
|
|
'lifecycle_state': i['LifecycleState'],
|
|
|
|
'launch_template': i['LaunchTemplate']}
|
|
|
|
'launch_template': i['LaunchTemplate']}
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
instance_facts[i['InstanceId']] = {'health_status': i['HealthStatus'],
|
|
|
|
|
|
|
|
'lifecycle_state': i['LifecycleState']}
|
|
|
|
if i['HealthStatus'] == 'Healthy' and i['LifecycleState'] == 'InService':
|
|
|
|
if i['HealthStatus'] == 'Healthy' and i['LifecycleState'] == 'InService':
|
|
|
|
properties['viable_instances'] += 1
|
|
|
|
properties['viable_instances'] += 1
|
|
|
|
if i['HealthStatus'] == 'Healthy':
|
|
|
|
if i['HealthStatus'] == 'Healthy':
|
|
|
|