1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Rename s3 module to aws_s3. Update CHANGELOG.md. (#28398)

Use aws_s3 in examples.
This commit is contained in:
Sloane Hertel 2017-08-22 11:17:20 -04:00 committed by Ryan Brown
parent 2ceff476bf
commit f7e67dc3b1
3 changed files with 20 additions and 14 deletions

View file

@ -55,6 +55,7 @@ Ansible Changes By Release
* panos_service (use M(panos_object) instead) * panos_service (use M(panos_object) instead)
* panos_security_policy: In 2.4 use M(panos_security_rule) 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. * panos_nat_policy, In 2.4 use M(panos_nat_rule) instead.
* s3 (removed in 2.7), replaced by aws_s3
#### Removed Deprecated Modules: #### Removed Deprecated Modules:
* eos_template (use eos_config instead) * eos_template (use eos_config instead)
@ -170,6 +171,7 @@ Ansible Changes By Release
#### Cloud #### Cloud
- amazon - amazon
* aws_api_gateway * aws_api_gateway
* aws_s3
* aws_s3_bucket_facts * aws_s3_bucket_facts
* data_pipeline * data_pipeline
* dynamodb_ttl * dynamodb_ttl

View file

@ -0,0 +1 @@
aws_s3.py

View file

@ -21,7 +21,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: s3 module: aws_s3
short_description: manage objects in S3. short_description: manage objects in S3.
description: description:
- This module allows the user to manage S3 buckets and the objects within them. Includes support for creating and - 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 = ''' EXAMPLES = '''
- name: Simple PUT operation - name: Simple PUT operation
s3: aws_s3:
bucket: mybucket bucket: mybucket
object: /my/desired/key.txt object: /my/desired/key.txt
src: /usr/local/myfile.txt src: /usr/local/myfile.txt
mode: put mode: put
- name: Simple PUT operation in Ceph RGW S3 - name: Simple PUT operation in Ceph RGW S3
s3: aws_s3:
bucket: mybucket bucket: mybucket
object: /my/desired/key.txt object: /my/desired/key.txt
src: /usr/local/myfile.txt src: /usr/local/myfile.txt
@ -160,14 +160,14 @@ EXAMPLES = '''
s3_url: "http://localhost:8000" s3_url: "http://localhost:8000"
- name: Simple GET operation - name: Simple GET operation
s3: aws_s3:
bucket: mybucket bucket: mybucket
object: /my/desired/key.txt object: /my/desired/key.txt
dest: /usr/local/myfile.txt dest: /usr/local/myfile.txt
mode: get mode: get
- name: Get a specific version of an object. - name: Get a specific version of an object.
s3: aws_s3:
bucket: mybucket bucket: mybucket
object: /my/desired/key.txt object: /my/desired/key.txt
version: 48c9ee5131af7a716edc22df9772aa6f version: 48c9ee5131af7a716edc22df9772aa6f
@ -175,7 +175,7 @@ EXAMPLES = '''
mode: get mode: get
- name: PUT/upload with metadata - name: PUT/upload with metadata
s3: aws_s3:
bucket: mybucket bucket: mybucket
object: /my/desired/key.txt object: /my/desired/key.txt
src: /usr/local/myfile.txt src: /usr/local/myfile.txt
@ -183,7 +183,7 @@ EXAMPLES = '''
metadata: 'Content-Encoding=gzip,Cache-Control=no-cache' metadata: 'Content-Encoding=gzip,Cache-Control=no-cache'
- name: PUT/upload with custom headers - name: PUT/upload with custom headers
s3: aws_s3:
bucket: mybucket bucket: mybucket
object: /my/desired/key.txt object: /my/desired/key.txt
src: /usr/local/myfile.txt src: /usr/local/myfile.txt
@ -191,12 +191,12 @@ EXAMPLES = '''
headers: 'x-amz-grant-full-control=emailAddress=owner@example.com' headers: 'x-amz-grant-full-control=emailAddress=owner@example.com'
- name: List keys simple - name: List keys simple
s3: aws_s3:
bucket: mybucket bucket: mybucket
mode: list mode: list
- name: List keys all options - name: List keys all options
s3: aws_s3:
bucket: mybucket bucket: mybucket
mode: list mode: list
prefix: /my/desired/ prefix: /my/desired/
@ -204,25 +204,25 @@ EXAMPLES = '''
max_keys: 472 max_keys: 472
- name: Create an empty bucket - name: Create an empty bucket
s3: aws_s3:
bucket: mybucket bucket: mybucket
mode: create mode: create
permission: public-read permission: public-read
- name: Create a bucket with key as directory, in the EU region - name: Create a bucket with key as directory, in the EU region
s3: aws_s3:
bucket: mybucket bucket: mybucket
object: /my/directory/path object: /my/directory/path
mode: create mode: create
region: eu-west-1 region: eu-west-1
- name: Delete a bucket and all contents - name: Delete a bucket and all contents
s3: aws_s3:
bucket: mybucket bucket: mybucket
mode: delete mode: delete
- name: GET an object but don't download if the file checksums match. New in 2.0 - name: GET an object but don't download if the file checksums match. New in 2.0
s3: aws_s3:
bucket: mybucket bucket: mybucket
object: /my/desired/key.txt object: /my/desired/key.txt
dest: /usr/local/myfile.txt dest: /usr/local/myfile.txt
@ -230,7 +230,7 @@ EXAMPLES = '''
overwrite: different overwrite: different
- name: Delete an object from a bucket - name: Delete an object from a bucket
s3: aws_s3:
bucket: mybucket bucket: mybucket
object: /my/desired/key.txt object: /my/desired/key.txt
mode: delobj mode: delobj
@ -537,6 +537,9 @@ def main():
supports_check_mode=True, 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: if not HAS_BOTO3:
module.fail_json(msg='boto3 and botocore required for this module') module.fail_json(msg='boto3 and botocore required for this module')