mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Previously to use the modes put or get the object had to be specified with a leading /. Since the boto call doesn't take an object like that this was overlooked and removed. Added a check to remove that leading character.
This commit is contained in:
parent
1ea0293878
commit
b3273223db
1 changed files with 4 additions and 0 deletions
|
@ -585,6 +585,10 @@ def main():
|
||||||
|
|
||||||
if module.params.get('object'):
|
if module.params.get('object'):
|
||||||
obj = module.params['object']
|
obj = module.params['object']
|
||||||
|
# If there is a top level object, do nothing - if the object starts with /
|
||||||
|
# remove the leading character to maintain compatibility with Ansible versions < 2.4
|
||||||
|
if obj.startswith('/'):
|
||||||
|
obj = obj[1:]
|
||||||
|
|
||||||
# Bucket deletion does not require obj. Prevents ambiguity with delobj.
|
# Bucket deletion does not require obj. Prevents ambiguity with delobj.
|
||||||
if obj and mode == "delete":
|
if obj and mode == "delete":
|
||||||
|
|
Loading…
Add table
Reference in a new issue