ansible ec2_ansible_facts boto module issue

Hi All,

We are using older ansible version 2.2.1.0 in a virtual environment hosted on Amazon linux. Tried to run the ec2.py dynamic inventory script and it failed with the below errors:

Error: boto required for this module

I can see boto lib installed on the virtualenv

pip list boto | grep boto

boto 2.48.0
boto3 1.14.21
botocore 1.17.21

Ansible --version
ansible 2.2.1.0

python --version
Python 2.7.18

which python -----> points to the correct instance in the virtualenv

~/virtualenv/ansible-2.2.1.0_venv/bin/python

Any ideas on the boto module issue?

Cheers,
Joseph

Hi All,

We are using older ansible version 2.2.1.0 in a virtual environment hosted on Amazon linux. Tried to run the ec2.py dynamic inventory script and it failed with the below errors:

Error: boto required for this module

I can see boto lib installed on the virtualenv

pip list boto | grep boto

boto 2.48.0
boto3 1.14.21
botocore 1.17.21

Ansible --version
ansible 2.2.1.0

This should give you much more information, including the used python version and its path, and the ansible path.

python --version
Python 2.7.18

which python -----> points to the correct instance in the virtualenv

~/virtualenv/ansible-2.2.1.0_venv/bin/python

Any ideas on the boto module issue?

Did you activate the virtualenv?
Just typing ansible or python in a shell will get you whatever is in your path. Which is usually a system python or ansible.