mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-01 06:41:26 -07:00
Examples syntax batch5 (#5622)
* Change example syntax on supervisorctl module * Change example syntax or _ec2_ami_search module * Change example syntax on cloudformation module * Change example syntax on ec2 module * Change example syntax on ec2_facts module * Change example syntax on ec2_eip module * Change example syntax on rds module * Change example syntax on route53 module * Change example syntax on s3 module * Change example syntax on digital_ocean module * Change example syntax on docker_service module * Change example syntax on cloudformation module * Change example syntax on gc_storage module * Change example syntax on gce module * Change example syntax on gce_mig module * Change example syntax on _glance_image module * Change example syntax on _keystone_user module * Change example syntax on _nova_keypair module * Change example syntax on _quantum_floating module * Change example syntax on _quantum_floating_ip_associate module * Change example syntax on _quantum_network module * Change example syntax on _quantum_router module * Change example syntax on _quantum_router_gateway module * Change example syntax on _quantum_router_interface module * Change example syntax on _quantum_subnet module * SQUASH _quantum_subnet * Add missing quotes
This commit is contained in:
parent
b56a9852ee
commit
38c0769abb
24 changed files with 385 additions and 167 deletions
|
@ -154,44 +154,97 @@ extends_documentation_fragment: aws
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Simple PUT operation
|
||||
- s3: bucket=mybucket object=/my/desired/key.txt src=/usr/local/myfile.txt mode=put
|
||||
- name: Simple PUT operation
|
||||
s3:
|
||||
bucket: mybucket
|
||||
object: /my/desired/key.txt
|
||||
src: /usr/local/myfile.txt
|
||||
mode: put
|
||||
|
||||
# Simple PUT operation in Ceph RGW S3
|
||||
- s3: bucket=mybucket object=/my/desired/key.txt src=/usr/local/myfile.txt mode=put rgw=true s3_url=http://localhost:8000
|
||||
- name: Simple PUT operation in Ceph RGW S3
|
||||
s3:
|
||||
bucket: mybucket
|
||||
object: /my/desired/key.txt
|
||||
src: /usr/local/myfile.txt
|
||||
mode: put
|
||||
rgw: true
|
||||
s3_url: "http://localhost:8000"
|
||||
|
||||
# Simple GET operation
|
||||
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get
|
||||
- name: Simple GET operation
|
||||
s3:
|
||||
bucket: mybucket
|
||||
object: /my/desired/key.txt
|
||||
dest: /usr/local/myfile.txt
|
||||
mode: get
|
||||
|
||||
# Get a specific version of an object.
|
||||
- s3: bucket=mybucket object=/my/desired/key.txt version=48c9ee5131af7a716edc22df9772aa6f dest=/usr/local/myfile.txt mode=get
|
||||
- name: Get a specific version of an object.
|
||||
s3:
|
||||
bucket: mybucket
|
||||
object: /my/desired/key.txt
|
||||
version: 48c9ee5131af7a716edc22df9772aa6f
|
||||
dest: /usr/local/myfile.txt
|
||||
mode: get
|
||||
|
||||
# PUT/upload with metadata
|
||||
- s3: bucket=mybucket object=/my/desired/key.txt src=/usr/local/myfile.txt mode=put metadata='Content-Encoding=gzip,Cache-Control=no-cache'
|
||||
- name: PUT/upload with metadata
|
||||
s3:
|
||||
bucket: mybucket
|
||||
object: /my/desired/key.txt
|
||||
src: /usr/local/myfile.txt
|
||||
mode: put
|
||||
metadata: 'Content-Encoding=gzip,Cache-Control=no-cache'
|
||||
|
||||
# PUT/upload with custom headers
|
||||
- s3: bucket=mybucket object=/my/desired/key.txt src=/usr/local/myfile.txt mode=put headers=x-amz-grant-full-control=emailAddress=owner@example.com
|
||||
- name: PUT/upload with custom headers
|
||||
s3:
|
||||
bucket: mybucket
|
||||
object: /my/desired/key.txt
|
||||
src: /usr/local/myfile.txt
|
||||
mode: put
|
||||
headers: 'x-amz-grant-full-control=emailAddress=owner@example.com'
|
||||
|
||||
# List keys simple
|
||||
- s3: bucket=mybucket mode=list
|
||||
- name: List keys simple
|
||||
s3:
|
||||
bucket: mybucket
|
||||
mode: list
|
||||
|
||||
# List keys all options
|
||||
- s3: bucket=mybucket mode=list prefix=/my/desired/ marker=/my/desired/0023.txt max_keys=472
|
||||
- name: List keys all options
|
||||
s3:
|
||||
bucket: mybucket
|
||||
mode: list
|
||||
prefix: /my/desired/
|
||||
marker: /my/desired/0023.txt
|
||||
max_keys: 472
|
||||
|
||||
# Create an empty bucket
|
||||
- s3: bucket=mybucket mode=create permission=public-read
|
||||
- name: Create an empty bucket
|
||||
s3:
|
||||
bucket: mybucket
|
||||
mode: create
|
||||
permission: public-read
|
||||
|
||||
# Create a bucket with key as directory, in the EU region
|
||||
- s3: bucket=mybucket object=/my/directory/path mode=create region=eu-west-1
|
||||
- name: Create a bucket with key as directory, in the EU region
|
||||
s3:
|
||||
bucket: mybucket
|
||||
object: /my/directory/path
|
||||
mode: create
|
||||
region: eu-west-1
|
||||
|
||||
# Delete a bucket and all contents
|
||||
- s3: bucket=mybucket mode=delete
|
||||
- name: Delete a bucket and all contents
|
||||
s3:
|
||||
bucket: mybucket
|
||||
mode: delete
|
||||
|
||||
# GET an object but dont download if the file checksums match. New in 2.0
|
||||
- s3: bucket=mybucket object=/my/desired/key.txt dest=/usr/local/myfile.txt mode=get overwrite=different
|
||||
- name: GET an object but dont download if the file checksums match. New in 2.0
|
||||
s3:
|
||||
bucket: mybucket
|
||||
object: /my/desired/key.txt
|
||||
dest: /usr/local/myfile.txt
|
||||
mode: get
|
||||
overwrite: different
|
||||
|
||||
# Delete an object from a bucket
|
||||
- s3: bucket=mybucket object=/my/desired/key.txt mode=delobj
|
||||
- name: Delete an object from a bucket
|
||||
s3:
|
||||
bucket: mybucket
|
||||
object: /my/desired/key.txt
|
||||
mode: delobj
|
||||
'''
|
||||
|
||||
import os
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue