|
|
@ -377,7 +377,7 @@ def main():
|
|
|
|
if overwrite is True:
|
|
|
|
if overwrite is True:
|
|
|
|
download_s3file(module, s3, bucket, obj, dest)
|
|
|
|
download_s3file(module, s3, bucket, obj, dest)
|
|
|
|
else:
|
|
|
|
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.
|
|
|
|
# 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:
|
|
|
|
if sum_matches is True and overwrite is False:
|
|
|
@ -421,7 +421,7 @@ def main():
|
|
|
|
if overwrite is True:
|
|
|
|
if overwrite is True:
|
|
|
|
upload_s3file(module, s3, bucket, obj, src, expiry, metadata)
|
|
|
|
upload_s3file(module, s3, bucket, obj, src, expiry, metadata)
|
|
|
|
else:
|
|
|
|
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 neither exist (based on bucket existence), we can create both.
|
|
|
|
if bucketrtn is False and pathrtn is True:
|
|
|
|
if bucketrtn is False and pathrtn is True:
|
|
|
|