Why config.global_inventory is empty?
januradha opened this issue · comments
Line 73 in aed0f80
since config.global_inventory list is empty so getting below error
Error :
Traceback (most recent call last):
File "/var/task/call_aws_inventory.py", line 5, in get_aws_inventory
inventory.call_inventory()
File "/var/task/inventory.py", line 123, in call_inventory
inventory[svc] = config.global_inventory[svc]
KeyError: 's3'
Hi, thank you for your feedback. It seems that you don't use the script directly but from your own program. Could you tell me:
- Is the output file OK? In the folder 'output' you should find a AWS_xxxxx.json file with the inventory.
- How to you call the inventory in your python? My script is not a module, the variables I use in it may be out of the scope of your programm, see https://docs.python.org/3/reference/executionmodel.html.
It's fixed.Anyway Thanks for Reply also.