1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Also don't fail if files are different and overwrite is false for uploads (this mimics copy and template).

Related to #489
This commit is contained in:
Toshio Kuratomi 2015-03-11 08:59:38 -07:00 committed by Matt Clay
parent 7d16ec283e
commit ba90eea165

View file

@ -377,7 +377,7 @@ def main():
if overwrite is True:
download_s3file(module, s3, bucket, obj, dest)
else:
module.exit_json(msg="WARNING: Checksums do not match. Use overwrite parameter to force download.", failed=False)
module.exit_json(msg="WARNING: Checksums do not match. Use overwrite parameter to force download.")
# Firstly, if key_matches is TRUE and overwrite is not enabled, we EXIT with a helpful message.
if sum_matches is True and overwrite is False:
@ -421,7 +421,7 @@ def main():
if overwrite is True:
upload_s3file(module, s3, bucket, obj, src, expiry, metadata)
else:
module.exit_json(msg="WARNING: Checksums do not match. Use overwrite parameter to force upload.", failed=True)
module.exit_json(msg="WARNING: Checksums do not match. Use overwrite parameter to force upload.")
# If neither exist (based on bucket existence), we can create both.
if bucketrtn is False and pathrtn is True: