From 0b294d69c55160889a802a2b3499a74c80f43bc3 Mon Sep 17 00:00:00 2001 From: Val Komarov Date: Wed, 14 Oct 2015 15:54:04 -0400 Subject: [PATCH] Remove duplicate logic --- lib/ansible/modules/cloud/amazon/s3.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/s3.py b/lib/ansible/modules/cloud/amazon/s3.py index ffa88855bcd..91aeccc7a39 100644 --- a/lib/ansible/modules/cloud/amazon/s3.py +++ b/lib/ansible/modules/cloud/amazon/s3.py @@ -35,7 +35,7 @@ options: default: null aliases: ['ec2_secret_key', 'secret_key'] bucket: - description: + description: - Bucket name. required: true default: null @@ -131,12 +131,12 @@ options: default: 0 version_added: "2.0" s3_url: - description: + description: - S3 URL endpoint for usage with Eucalypus, fakes3, etc. Otherwise assumes AWS default: null aliases: [ S3_URL ] src: - description: + description: - The source file path when performing a PUT operation. required: false default: null @@ -416,17 +416,11 @@ def main(): if acl not in CannedACLStrings: module.fail_json(msg='Unknown permission specified: %s' % str(acl)) - if overwrite not in ['always', 'never', 'different']: + 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' - else: - overwrite='never' + overwrite = 'never' region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)