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":
|
||||
name_tag = tag['Value']
|
||||
break
|
||||
osPlatform = "Linux"
|
||||
if i.get('Platform') == "Windows":
|
||||
osPlatform = "Windows"
|
||||
return_data.append([i['InstanceId'], name_tag, osPlatform, i['InstanceType'], i['PrivateIpAddress'], i['Placement']['AvailabilityZone']])
|
||||
return_data.append([i['InstanceId'], name_tag, i.get('PlatformDetails'), i['InstanceType'], i['PrivateIpAddress'], i['Placement']['AvailabilityZone']])
|
||||
return return_data
|
||||
|
||||
# Main function
|
||||
|
||||
Reference in New Issue
Block a user