Skip to content

Commit

Permalink
fix ignore_nonexistent_bucket bug for listing (ansible-collections#966)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Simbola committed Aug 11, 2022
1 parent ffd8c1a commit 2f3c269
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugins/modules/s3_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,10 +1168,9 @@ def main():

# Support for listing a set of keys
if mode == 'list':
exists = bucket_check(module, s3, bucket)

# If the bucket does not exist then bail out
if not exists:
if not bucketrtn:
module.fail_json(msg="Target bucket (%s) cannot be found" % bucket)

list_keys(module, s3, bucket, prefix, marker, max_keys)
Expand Down

0 comments on commit 2f3c269

Please sign in to comment.