fix: corrected os platform in ec2 inventory

This commit is contained in:
KenF
2026-01-22 17:32:31 +08:00
parent 9b85be644c
commit 0614cee9b2
+1 -4
View File
@@ -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