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

Related to #489
reviewable/pr18780/r1
Toshio Kuratomi 10 years ago
parent ca32205c7b
commit 974075277d

@ -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:

Loading…
Cancel
Save