On 23/03/19 2:48 AM, [email protected] wrote:
This Play installs python3, pip3, boto3 and botocore, and trys to use
aws_s3 module to download a file:
TASK [run yum update -y using yum module]
***************************************************************************************
ok: [ip-10-200-2-137.us-west-2.compute.internal]
TASK [Install python3 and pip3]
*************************************************************************************************
changed: [ip-10-200-2-137.us-west-2.compute.internal]
TASK [Install boto3 and botocore with pip3 module]
******************************************************************************
changed: [ip-10-200-2-137.us-west-2.compute.internal]
TASK [Create a directory if it does not exist using file module]
****************************************************************
changed: [ip-10-200-2-137.us-west-2.compute.internal]
TASK [downlod file from s3 with aws_s3 module]
**********************************************************************************
fatal: [ip-10-200-2-137.us-west-2.compute.internal]: FAILED! =>
{"changed": false, "msg": "Python modules \"botocore\" or \"boto3\"
are missing, please install both"}
It fails because it says boto3 is missing, but it actually is not:
From the Target host you can see that boto3 is installed:
[ec2-user@ip-10-200-2-137 ~]$ pip3 freeze
boto3==1.9.120
botocore==1.12.120
docutils==0.14
jmespath==0.9.4
python-dateutil==2.8.0
s3transfer==0.2.0
six==1.12.0
urllib3==1.24.1
[ec2-user@ip-10-200-2-137 ~]
Is this is bug? Thank you for any help
This is the task that fails:
- name: downlod file from s3 with aws_s3 module aws_s3: bucket:
mybucket object: mybucket/jre-8u201-linux-x64.tar.gz dest:
/home/ec2-user/updater/jre-8u201-linux-x64.tar.gz mode: get
--
You received this message because you are subscribed to the Google
Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/e81f25a5-1104-4b36-b2a4-5a037610a9b9%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/e81f25a5-1104-4b36-b2a4-5a037610a9b9%40googlegroups.com?utm_medium=email&utm_source=footer>.
This doesn't look like a bug. It looks like boto is not available via
the Python interpreter Ansible is using on the target.
SSH on to the target, start the Python interpreter and see if you can
import boto:
python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto
>>>
-
Sudheer S
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/525071d8-7e4f-c25f-53fa-77077f60e2b1%40techchorus.net.
For more options, visit https://groups.google.com/d/optout.