jazkarta / isc_edx_configuration

a simple, but flexible, way for anyone to stand up an instance of the edX platform that is fully configured and ready-to-go
GNU Affero General Public License v3.0
0 stars 1 forks source link

msg: boto required for this module #2

Open natea opened 9 years ago

natea commented 9 years ago

When I try to run the ansible-playbook command, it says that boto is required. What's strange is that I've already installed boto globally with sudo pip install boto and i've created the ~/.boto file with my AWS keys.

$ ansible-playbook -i local isc/aws_monolith.yml -e "instance_name_tag=isc_testing"

PLAY [Provision Instance] *****************************************************

TASK: [launch_isc_ec2 | lookup tags for existing instances] *******************
failed: [localhost -> 127.0.0.1] => {"failed": true}
msg: boto required for this module

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/Users/nateaune/aws_monolith.retry

localhost                  : ok=0    changed=0    unreachable=0    failed=1

And here is an attempt to upgrade the already installed boto:

$ sudo pip install boto
Requirement already satisfied (use --upgrade to upgrade): boto in /usr/local/lib/python2.7/site-packages
Cleaning up...

nateaune at natembp in ~/Dropbox/code/isc/isc_edx_configuration/playbooks (isc_release)
$ sudo pip install --upgrade boto
Requirement already up-to-date: boto in /usr/local/lib/python2.7/site-packages
Cleaning up...
natea commented 9 years ago

I also tried setting environment variables by exporting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, but I still get the same error.

davisagli commented 9 years ago

Sounds like ansible-playbook is not running with the same python that you're pip installing into.

natea commented 9 years ago

Both python and ansible-playbook live in /usr/local/bin:

$ which ansible-playbook /usr/local/bin/ansible-playbook

$ which python /usr/local/bin/python

how can i tell which python ansible-playbook is using?

On Wed, Nov 5, 2014 at 5:39 PM, David Glick notifications@github.com wrote:

Sounds like ansible-playbook is not running with the same python that you're pip installing into.

— Reply to this email directly or view it on GitHub https://github.com/jazkarta/isc_edx_configuration/issues/2#issuecomment-61894847 .

nate@appsembler.com +1 (617) 517-4953 http://twitter.com/natea | http://linkedin.com/in/natea

natea commented 9 years ago

$ which pip /usr/local/bin/pip

On Wed, Nov 5, 2014 at 5:53 PM, Nate Aune nate@appsembler.com wrote:

Both python and ansible-playbook live in /usr/local/bin:

$ which ansible-playbook /usr/local/bin/ansible-playbook

$ which python /usr/local/bin/python

how can i tell which python ansible-playbook is using?

On Wed, Nov 5, 2014 at 5:39 PM, David Glick notifications@github.com wrote:

Sounds like ansible-playbook is not running with the same python that you're pip installing into.

— Reply to this email directly or view it on GitHub https://github.com/jazkarta/isc_edx_configuration/issues/2#issuecomment-61894847 .

nate@appsembler.com +1 (617) 517-4953 http://twitter.com/natea | http://linkedin.com/in/natea

nate@appsembler.com +1 (617) 517-4953 http://twitter.com/natea | http://linkedin.com/in/natea

davisagli commented 9 years ago

how can i tell which python ansible-playbook is using?

Open it and look at its shebang line.

natea commented 9 years ago

!/usr/local/opt/python/bin/python2.7

which is a symlink to python2.7 -> ../Cellar/python/2.7.8_2/bin/python2.7

/usr/local/bin/python is a symlink to: python -> ../Cellar/python/2.7.8_2/bin/python

so it would appear that they're pointing to the same python?

On Wed, Nov 5, 2014 at 5:56 PM, David Glick notifications@github.com wrote:

how can i tell which python ansible-playbook is using?

Open it and look at its shebang line.

— Reply to this email directly or view it on GitHub https://github.com/jazkarta/isc_edx_configuration/issues/2#issuecomment-61897278 .

nate@appsembler.com +1 (617) 517-4953 http://twitter.com/natea | http://linkedin.com/in/natea

cewing commented 9 years ago

You can also be explicit about which python is being used with ansible_python_interpreter, either on the command line with -e or in the top level playbook.

Ansible is freakishly finicky about boto, though. I've had trouble with it, and iirc @davisagli did too.

But for me, installing both globally with pip worked.