From 70188fe02a7a746ec68629d5ed7dae038bb47ea1 Mon Sep 17 00:00:00 2001 From: Benno Joy Date: Thu, 14 May 2015 09:03:50 +0530 Subject: [PATCH] Fixes issue 1197 for s3 module, where the file gets downloaded even if checksums match --- lib/ansible/modules/cloud/amazon/s3.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ansible/modules/cloud/amazon/s3.py b/lib/ansible/modules/cloud/amazon/s3.py index a9dafeaaae9..e14a1ba701c 100644 --- a/lib/ansible/modules/cloud/amazon/s3.py +++ b/lib/ansible/modules/cloud/amazon/s3.py @@ -328,6 +328,12 @@ def main(): s3_url = module.params.get('s3_url') src = module.params.get('src') + if overwrite not in ['always', 'never', 'different']: + if module.boolean(overwrite): + overwrite = 'always' + else: + overwrite='never' + if overwrite not in ['always', 'never', 'different']: if module.boolean(overwrite): overwrite = 'always'