0

I'm trying to run ansible with the ec2.py inventory file to make some updates on a fleet of servers. But I keep receiving the error message:

ERROR! Attempted to execute "inventories/ec2.py" as inventory script: Inventory script (inventories/ec2.py) had an execution error: Traceback (most recent call last): File "/Users/myname/Sites/admin/ansible/inventories/ec2.py", line 130, in <module> from boto import elasticache ImportError: cannot import name elasticache

I have tried to reinstall both ansible via homebrew and boto via pip but to no avail. Looking for any direction on how I can solve this issue.

My setup:

  • Mac OSX 10.11.6
  • Python 2.7.13
  • Ansible 2.3.0.0
  • boto 2.46.1
whobutsb
  • 249
  • 2
  • 3
  • 6

1 Answers1

0

So the issue lies in where boto was installed. Boto had been installed with the root user and not my user. To resolve this issue run:

pip install --user boto

whobutsb
  • 249
  • 2
  • 3
  • 6