Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'ec2' from 'ansible.module_utils' #2

Open
SaheedLawanson opened this issue May 12, 2022 · 0 comments
Open

cannot import name 'ec2' from 'ansible.module_utils' #2

SaheedLawanson opened this issue May 12, 2022 · 0 comments

Comments

@SaheedLawanson
Copy link

SaheedLawanson commented May 12, 2022

I get this error:

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)  

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant