Removes expanduser in favor of type 'path'
Removes the usage of expanduser because it is automatically handed by specifying a type of 'path'. Related to #12263
This commit is contained in:
parent
9389fafae8
commit
22926088a0
1 changed files with 2 additions and 6 deletions
|
@ -376,9 +376,9 @@ def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec = dict(
|
argument_spec = dict(
|
||||||
bucket = dict(required=True),
|
bucket = dict(required=True),
|
||||||
object = dict(default=None),
|
object = dict(default=None, type='path'),
|
||||||
src = dict(default=None),
|
src = dict(default=None),
|
||||||
dest = dict(default=None),
|
dest = dict(default=None, type='path'),
|
||||||
expiration = dict(type='int', default=600, aliases=['expiry']),
|
expiration = dict(type='int', default=600, aliases=['expiry']),
|
||||||
mode = dict(choices=['get', 'put', 'delete', 'create', 'get_url', 'get_str'], required=True),
|
mode = dict(choices=['get', 'put', 'delete', 'create', 'get_url', 'get_str'], required=True),
|
||||||
permission = dict(choices=['private', 'public-read', 'authenticated-read'], default='private'),
|
permission = dict(choices=['private', 'public-read', 'authenticated-read'], default='private'),
|
||||||
|
@ -396,8 +396,6 @@ def main():
|
||||||
obj = module.params.get('object')
|
obj = module.params.get('object')
|
||||||
src = module.params.get('src')
|
src = module.params.get('src')
|
||||||
dest = module.params.get('dest')
|
dest = module.params.get('dest')
|
||||||
if dest:
|
|
||||||
dest = os.path.expanduser(dest)
|
|
||||||
mode = module.params.get('mode')
|
mode = module.params.get('mode')
|
||||||
expiry = module.params.get('expiration')
|
expiry = module.params.get('expiration')
|
||||||
gs_secret_key = module.params.get('gs_secret_key')
|
gs_secret_key = module.params.get('gs_secret_key')
|
||||||
|
@ -410,8 +408,6 @@ def main():
|
||||||
if mode == 'get':
|
if mode == 'get':
|
||||||
if not dest or not object:
|
if not dest or not object:
|
||||||
module.fail_json(msg="When using GET, dest, bucket, object are mandatory parameters")
|
module.fail_json(msg="When using GET, dest, bucket, object are mandatory parameters")
|
||||||
if obj:
|
|
||||||
obj = os.path.expanduser(module.params['object'])
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gs = boto.connect_gs(gs_access_key, gs_secret_key)
|
gs = boto.connect_gs(gs_access_key, gs_secret_key)
|
||||||
|
|
Loading…
Add table
Reference in a new issue