fix: corrected os platform in ec2 inventory
This commit is contained in:
+1
-4
@@ -27,10 +27,7 @@ def printResources(region_name: str) -> list[list[str | int]]:
|
|||||||
if tag['Key'] == "Name":
|
if tag['Key'] == "Name":
|
||||||
name_tag = tag['Value']
|
name_tag = tag['Value']
|
||||||
break
|
break
|
||||||
osPlatform = "Linux"
|
return_data.append([i['InstanceId'], name_tag, i.get('PlatformDetails'), i['InstanceType'], i['PrivateIpAddress'], i['Placement']['AvailabilityZone']])
|
||||||
if i.get('Platform') == "Windows":
|
|
||||||
osPlatform = "Windows"
|
|
||||||
return_data.append([i['InstanceId'], name_tag, osPlatform, i['InstanceType'], i['PrivateIpAddress'], i['Placement']['AvailabilityZone']])
|
|
||||||
return return_data
|
return return_data
|
||||||
|
|
||||||
# Main function
|
# Main function
|
||||||
|
|||||||
Reference in New Issue
Block a user