Context:
- Your installed version is Ansible 2.10.8
shell> root@6140e6e2c06c:/# ansible --version
ansible 2.10.8
...
- The collection amazon.aws should be installed in Ansible 2.10.8 by default. See the build
amazon.aws: >=1.2.0,<2.0.0
- The module s3_object was added in the collection amazon.aws version 1.0.0. See the source
DOCUMENTATION = r"""
---
module: s3_object
version_added: 1.0.0
short_description: Manage objects in S3
root@6140e6e2c06c:/# ansible --version
ansible 2.10.8
config file = None
Solution:
Make sure the collection is included in the COLLECTIONS_PATHS. For example,
shell> ansible-config dump | grep COLLECTIONS_PATHS
COLLECTIONS_PATHS(/scratch/tmp7/test-353/ansible.cfg) = ['/home/admin/.local/lib/python3.9/site-packages']
shell> find /home/admin/.local/lib/python3.9/site-packages -name s3_object.py
/home/admin/.local/lib/python3.9/site-packages/ansible_collections/amazon/aws/plugins/action/s3_object.py
/home/admin/.local/lib/python3.9/site-packages/ansible_collections/amazon/aws/plugins/modules/s3_object.py
Change the path depending on where you installed the collections.
Note:
It is possible to install more versions of Ansible collections simultaneously. It's up to you to configure the path to the version you want to use.