I am trying to create and ec2 instance from my Mac OSX machine. I highlighted the failure in Yellow. I have installed boto and boto3 via pip and there were no error messages on install.
=> pip3 list
Package Version
boto 2.48.0
boto3 1.7.21
=> pip list |grep boto RETURNS NOTHING
=> pip install boto
Collecting boto
Using cached https://files.pythonhosted.org/packages/bd/b7/a88a67002b1185ed9a8e8a6ef15266728c2361fcb4f1d02ea331e4c7741d/boto-2.48.0-py2.py3-none-any.whl
matplotlib 1.3.1 requires tornado, which is not installed.
Installing collected packages: boto
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ‘/Library/Python/2.7/site-packages/boto’
Consider using the--user
option or check the permissions.
=> sudo pip install boto
The directory ‘/Users/jim/Library/Caches/pip/http’ or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
The directory ‘/Users/jim/Library/Caches/pip’ or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo’s -H flag.
Requirement already satisfied: boto in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (2.48.0)
I have ansible installed:
=> ansible --version
ansible 2.4.2.0
config file = None
configured module search path = [u’/Users/jim/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/Cellar/ansible/2.4.2.0_1/libexec/lib/python2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
~/vagrant/Projects/ansible-test/share-ansible @ MacBookPro (jim) (my credentails file is not in the current directory )
=> ls -la …/…/…/…/.aws/
total 8
drwxr-xr-x 4 jim staff 128 Oct 20 2017 .
drwxr-xr-x+ 70 jim staff 2240 May 15 14:38 …
-rw------- 1 jim staff 29 May 11 16:29 config
-rw------- 1 jim staff 116 May 6 19:27 credentials
=> ansible-playbook -i ./hosts ec2.key.yml
PLAY [local] ***************************************************************************************
TASK [Create a new EC2 key] ************************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “boto required for this module”}
to retry, use: --limit @/Users/jim/vagrant/Projects/ansible-test/share-ansible/ec2.key.retry
PLAY RECAP *****************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1