diff --git a/CHANGELOG.md b/CHANGELOG.md index 27f1d31bd5..d5a3b5cee3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ Ansible Changes By Release * panos_service (use M(panos_object) instead) * panos_security_policy: In 2.4 use M(panos_security_rule) instead. * panos_nat_policy, In 2.4 use M(panos_nat_rule) instead. +* s3 (removed in 2.7), replaced by aws_s3 #### Removed Deprecated Modules: * eos_template (use eos_config instead) @@ -170,6 +171,7 @@ Ansible Changes By Release #### Cloud - amazon * aws_api_gateway + * aws_s3 * aws_s3_bucket_facts * data_pipeline * dynamodb_ttl diff --git a/lib/ansible/modules/cloud/amazon/_s3.py b/lib/ansible/modules/cloud/amazon/_s3.py new file mode 120000 index 0000000000..f56735c39c --- /dev/null +++ b/lib/ansible/modules/cloud/amazon/_s3.py @@ -0,0 +1 @@ +aws_s3.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/amazon/s3.py b/lib/ansible/modules/cloud/amazon/aws_s3.py similarity index 99% rename from lib/ansible/modules/cloud/amazon/s3.py rename to lib/ansible/modules/cloud/amazon/aws_s3.py index 1a73b6be9c..969268710e 100644 --- a/lib/ansible/modules/cloud/amazon/s3.py +++ b/lib/ansible/modules/cloud/amazon/aws_s3.py @@ -21,7 +21,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: s3 +module: aws_s3 short_description: manage objects in S3. description: - This module allows the user to manage S3 buckets and the objects within them. Includes support for creating and @@ -144,14 +144,14 @@ extends_documentation_fragment: aws EXAMPLES = ''' - name: Simple PUT operation - s3: + aws_s3: bucket: mybucket object: /my/desired/key.txt src: /usr/local/myfile.txt mode: put - name: Simple PUT operation in Ceph RGW S3 - s3: + aws_s3: bucket: mybucket object: /my/desired/key.txt src: /usr/local/myfile.txt @@ -160,14 +160,14 @@ EXAMPLES = ''' s3_url: "http://localhost:8000" - name: Simple GET operation - s3: + aws_s3: bucket: mybucket object: /my/desired/key.txt dest: /usr/local/myfile.txt mode: get - name: Get a specific version of an object. - s3: + aws_s3: bucket: mybucket object: /my/desired/key.txt version: 48c9ee5131af7a716edc22df9772aa6f @@ -175,7 +175,7 @@ EXAMPLES = ''' mode: get - name: PUT/upload with metadata - s3: + aws_s3: bucket: mybucket object: /my/desired/key.txt src: /usr/local/myfile.txt @@ -183,7 +183,7 @@ EXAMPLES = ''' metadata: 'Content-Encoding=gzip,Cache-Control=no-cache' - name: PUT/upload with custom headers - s3: + aws_s3: bucket: mybucket object: /my/desired/key.txt src: /usr/local/myfile.txt @@ -191,12 +191,12 @@ EXAMPLES = ''' headers: 'x-amz-grant-full-control=emailAddress=owner@example.com' - name: List keys simple - s3: + aws_s3: bucket: mybucket mode: list - name: List keys all options - s3: + aws_s3: bucket: mybucket mode: list prefix: /my/desired/ @@ -204,25 +204,25 @@ EXAMPLES = ''' max_keys: 472 - name: Create an empty bucket - s3: + aws_s3: bucket: mybucket mode: create permission: public-read - name: Create a bucket with key as directory, in the EU region - s3: + aws_s3: bucket: mybucket object: /my/directory/path mode: create region: eu-west-1 - name: Delete a bucket and all contents - s3: + aws_s3: bucket: mybucket mode: delete - name: GET an object but don't download if the file checksums match. New in 2.0 - s3: + aws_s3: bucket: mybucket object: /my/desired/key.txt dest: /usr/local/myfile.txt @@ -230,7 +230,7 @@ EXAMPLES = ''' overwrite: different - name: Delete an object from a bucket - s3: + aws_s3: bucket: mybucket object: /my/desired/key.txt mode: delobj @@ -537,6 +537,9 @@ def main(): supports_check_mode=True, ) + if module._name == 's3': + module.deprecate("The 's3' module is being renamed 'aws_s3'", version=2.7) + if not HAS_BOTO3: module.fail_json(msg='boto3 and botocore required for this module')