mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fixup the directory name at a higher level so it can be used by both conditional branches
Fixes #500
This commit is contained in:
parent
44cc1a75ba
commit
37f237ecfc
1 changed files with 5 additions and 4 deletions
|
@ -319,11 +319,12 @@ def handle_create(module, gs, bucket, obj):
|
|||
else:
|
||||
module.exit_json(msg="Bucket created successfully", changed=create_bucket(module, gs, bucket))
|
||||
if bucket and obj:
|
||||
if obj.endswith('/'):
|
||||
dirobj = obj
|
||||
else:
|
||||
dirobj = obj + "/"
|
||||
|
||||
if bucket_check(module, gs, bucket):
|
||||
if obj.endswith('/'):
|
||||
dirobj = obj
|
||||
else:
|
||||
dirobj = obj + "/"
|
||||
if key_check(module, gs, bucket, dirobj):
|
||||
module.exit_json(msg="Bucket %s and key %s already exists."% (bucket, obj), changed=False)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue