Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename aws_s3 to s3_object (and deprecate bucket creation/deleting) #869

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions changelogs/fragments/869-s3_object.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
minor_changes:
- aws_s3 - The ``aws_s3`` module has been renamed to ``s3_object``
(https://github.com/ansible-collections/amazon.aws/pull/869).
deprecated_features:
- s3_object - Support for creation and deletion of S3 buckets has been deprecated. Please use the
``amazon.aws.s3_bucket`` module to create and delete buckets
(https://github.com/ansible-collections/amazon.aws/pull/869).
7 changes: 6 additions & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ action_groups:
- aws_az_info
- aws_caller_info
- aws_s3
- aws_s3
- aws_secret
- cloudformation
- cloudformation_info
Expand Down Expand Up @@ -48,14 +47,20 @@ action_groups:
- iam
- rds
- s3_bucket
- s3_object
plugin_routing:
action:
aws_s3:
redirect: amazon.aws.s3_object
modules:
aws_az_facts:
deprecation:
removal_date: 2022-06-01
warning_text: >-
aws_az_facts was renamed in Ansible 2.9 to aws_az_info.
Please update your tasks.
aws_s3:
redirect: amazon.aws.s3_object
ec2:
deprecation:
removal_version: 4.0.0
Expand Down
8 changes: 6 additions & 2 deletions plugins/action/aws_s3.py → plugins/action/s3_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ class ActionModule(ActionBase):
TRANSFERS_FILES = True

def run(self, tmp=None, task_vars=None):
''' handler for aws_s3 operations '''
''' handler for s3_object operations

This adds the magic that means 'src' can point to both a 'remote' file
on the 'host' or in the 'files/' lookup path on the controller.
'''
self._supports_async = True

if task_vars is None:
Expand Down Expand Up @@ -59,7 +63,7 @@ def run(self, tmp=None, task_vars=None):
raise AnsibleActionFail(to_text(e))

wrap_async = self._task.async_val and not self._connection.has_native_async
# execute the aws_s3 module with the updated args
# execute the s3_object module with the updated args
result = merge_hash(result, self._execute_module(module_args=new_module_args, task_vars=task_vars, wrap_async=wrap_async))

if not wrap_async:
Expand Down
Loading