I am trying to get a file from gcloud bucket using gc_storage
module but I get the error fatal: [10.xx.xxx.xx]: FAILED! => {"changed": false, "msg": "'boto' 2.9+ is required for this module. Try: pip install 'boto' --upgrade"}
My playbook looks like this
---
- name: update key
hosts: tools
tasks:
- name: get link.sh
gc_storage:
bucket: cmg-tools-packer
object: tenable/link.sh
dest: /tmp
mode: get
gs_access_key: "0xxxxxxxxxxxxxxxxxxxxxxxxxxc"
gs_secret_key: "-----BEGIN PRIVATE KEY-----\nMII\n-----END PRIVATE KEY-----\n"
My inventory looks like
[tools]
10.xx.xxx.xx ansible_python_interpreter=python3
I have boto installed on my ansible server as well as on the target server.
Version output on ansible server:
kkatyal@tools-ansible:~/playbooks$ pip show boto
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Name: boto
Version: 2.49.0
Summary: Amazon Web Services Library
Home-page: https://github.com/boto/boto/
Author: Mitch Garnaat
Author-email: mitch@garnaat.com
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires:
Required-by:
kkatyal@tools-ansible:~/playbooks$ pip3 show boto3
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Name: boto3
Version: 1.17.20
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email: None
License: Apache License 2.0
Location: /usr/local/lib/python2.7/dist-packages
Requires: botocore, jmespath, s3transfer
Required-by:
Not sure what is the issue here. TIA for your input.