mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00: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:
@@ -96,26 +96,49 @@ author: "Benno Joy (@bennojoy)"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# upload some content
|
||||
- gc_storage: bucket=mybucket object=key.txt src=/usr/local/myfile.txt mode=put permission=public-read
|
||||
- name: Upload some content
|
||||
gc_storage:
|
||||
bucket: mybucket
|
||||
object: key.txt
|
||||
src: /usr/local/myfile.txt
|
||||
mode: put
|
||||
permission: public-read
|
||||
|
||||
# upload some headers
|
||||
- gc_storage: bucket=mybucket object=key.txt src=/usr/local/myfile.txt headers='{"Content-Encoding": "gzip"}'
|
||||
- name: Upload some headers
|
||||
gc_storage:
|
||||
bucket: mybucket
|
||||
object: key.txt
|
||||
src: /usr/local/myfile.txt
|
||||
headers: '{"Content-Encoding": "gzip"}'
|
||||
|
||||
# download some content
|
||||
- gc_storage: bucket=mybucket object=key.txt dest=/usr/local/myfile.txt mode=get
|
||||
- name: Download some content
|
||||
gc_storage:
|
||||
bucket: mybucket
|
||||
object: key.txt
|
||||
dest: /usr/local/myfile.txt
|
||||
mode: get
|
||||
|
||||
# Download an object as a string to use else where in your playbook
|
||||
- gc_storage: bucket=mybucket object=key.txt mode=get_str
|
||||
- name: Download an object as a string to use else where in your playbook
|
||||
gc_storage:
|
||||
bucket: mybucket
|
||||
object: key.txt
|
||||
mode: get_str
|
||||
|
||||
# Create an empty bucket
|
||||
- gc_storage: bucket=mybucket mode=create
|
||||
- name: Create an empty bucket
|
||||
gc_storage:
|
||||
bucket: mybucket
|
||||
mode: create
|
||||
|
||||
# Create a bucket with key as directory
|
||||
- gc_storage: bucket=mybucket object=/my/directory/path mode=create
|
||||
- name: Create a bucket with key as directory
|
||||
gc_storage:
|
||||
bucket: mybucket
|
||||
object: /my/directory/path
|
||||
mode: create
|
||||
|
||||
# Delete a bucket and all contents
|
||||
- gc_storage: bucket=mybucket mode=delete
|
||||
- name: Delete a bucket and all contents
|
||||
gc_storage:
|
||||
bucket: mybucket
|
||||
mode: delete
|
||||
'''
|
||||
|
||||
import os
|
||||
|
||||
Reference in New Issue
Block a user