short_description: This module help users manage objects/buckets in GCS (Google Cloud Storage).
description:
- This module allows users to manage their objects/buckets in GCS in an idempotent way. Users can do operations like PUT, GET and set some pre-canned permissions on those objects.Users can also retrieve the urls to their objects to be used in playbooks. They can also use the module to get the string contents of the objects. Please note that this module is compatible with API version 1 of GCS. so it expects the user to set the default project before using this module, Have a lookt at "https://developers.google.com/storage/docs/reference/v1/apiversion1" to set the default project.
...
...
@@ -55,6 +55,12 @@ options:
- This option let's the user set the canned permissions on the object/bucket that are created. The permissions that can be set are 'private', 'public-read', 'authenticated-read'.
required: false
default: private
expiry:
description:
- Time limit (in seconds) for the URL generated and returned by GCA when performing a mode=put or mode=geturl operation. This url is only avaialbe when public-read is the acl for the object.
required: false
default: null
aliases: []
mode:
description:
- Switches the module behaviour between put (upload), get (download), geturl (return download url) , getstr (download object as string), create (bucket) and delete (bucket).
...
...
@@ -64,14 +70,16 @@ options:
gcs_secret_key:
description:
- GCS secret key. If not set then the value of the GCS_SECRET_KEY environment variable is used.
required: false
required: true
default: null
gcs_access_key:
description:
- GCS access key. If not set then the value of the GCS_ACCESS_KEY environment variable is used.
required: false
required: true
default: null
requirements: [ "boto" ]
requirements: [ "boto 2.9+" ]
author: benno@ansibleworks.com Note. Most of the code has been taken from the S3 module.
'''
...
...
@@ -103,7 +111,7 @@ import hashlib
try:
importboto
exceptImportError:
print"failed=True msg='boto required for this module'"
print"failed=True msg='boto 2.9+ required for this module'"