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'