mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[aws_s3] different fail msg depending on whether version is specified (#31598)
This commit is contained in:
parent
3ef4f7e847
commit
03ec3cd572
1 changed files with 4 additions and 1 deletions
|
@ -693,7 +693,10 @@ def main():
|
|||
# Next, we check to see if the key in the bucket exists. If it exists, it also returns key_matches md5sum check.
|
||||
keyrtn = key_check(module, s3, bucket, obj, version=version, validate=validate)
|
||||
if keyrtn is False:
|
||||
if version:
|
||||
module.fail_json(msg="Key %s with version id %s does not exist." % (obj, version))
|
||||
else:
|
||||
module.fail_json(msg="Key %s does not exist." % obj)
|
||||
|
||||
# If the destination path doesn't exist or overwrite is True, no need to do the md5um etag check, so just download.
|
||||
# Compare the remote MD5 sum of the object with the local dest md5sum, if it already exists.
|
||||
|
|
Loading…
Reference in a new issue