Traceback (most recent call last):
File "./ec2.py", line 138, in <module>
from ansible.module_utils import ec2 as ec2_utils
ImportError: cannot import name 'ec2' from 'ansible.module_utils' (/usr/local/lib/python3.8/dist-packages/ansible/module_utils/__init__.py)
I get this error:
whenever i run
./ec2.py. I think it has something to do with a newer version of ansible. But i've searched everywhere, ansible's documentation on the topic have outdated links: https://docs.ansible.com/ansible/2.3/intro_dynamic_inventory.html#example-aws-ec2-external-inventory-script and it's been slowing down my learning. This is the last option i could think of. Please if i could get pointed to a solution or an alternative to use inventories so i can follow along with the book.