mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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(
|
||||
argument_spec = dict(
|
||||
bucket = dict(required=True),
|
||||
object = dict(default=None),
|
||||
object = dict(default=None, type='path'),
|
||||
src = dict(default=None),
|
||||
dest = dict(default=None),
|
||||
dest = dict(default=None, type='path'),
|
||||
expiration = dict(type='int', default=600, aliases=['expiry']),
|
||||
mode = dict(choices=['get', 'put', 'delete', 'create', 'get_url', 'get_str'], required=True),
|
||||
permission = dict(choices=['private', 'public-read', 'authenticated-read'], default='private'),
|
||||
|
@ -396,8 +396,6 @@ def main():
|
|||
obj = module.params.get('object')
|
||||
src = module.params.get('src')
|
||||
dest = module.params.get('dest')
|
||||
if dest:
|
||||
dest = os.path.expanduser(dest)
|
||||
mode = module.params.get('mode')
|
||||
expiry = module.params.get('expiration')
|
||||
gs_secret_key = module.params.get('gs_secret_key')
|
||||
|
@ -410,8 +408,6 @@ def main():
|
|||
if mode == 'get':
|
||||
if not dest or not object:
|
||||
module.fail_json(msg="When using GET, dest, bucket, object are mandatory parameters")
|
||||
if obj:
|
||||
obj = os.path.expanduser(module.params['object'])
|
||||
|
||||
try:
|
||||
gs = boto.connect_gs(gs_access_key, gs_secret_key)
|
||||
|
|
Loading…
Reference in a new issue