Remove duplicate logic

This commit is contained in:
Val Komarov 2015-10-14 15:54:04 -04:00
parent eb30416d71
commit 986d4064e9

View file

@ -35,7 +35,7 @@ options:
default: null default: null
aliases: ['ec2_secret_key', 'secret_key'] aliases: ['ec2_secret_key', 'secret_key']
bucket: bucket:
description: description:
- Bucket name. - Bucket name.
required: true required: true
default: null default: null
@ -131,12 +131,12 @@ options:
default: 0 default: 0
version_added: "2.0" version_added: "2.0"
s3_url: s3_url:
description: description:
- S3 URL endpoint for usage with Eucalypus, fakes3, etc. Otherwise assumes AWS - S3 URL endpoint for usage with Eucalypus, fakes3, etc. Otherwise assumes AWS
default: null default: null
aliases: [ S3_URL ] aliases: [ S3_URL ]
src: src:
description: description:
- The source file path when performing a PUT operation. - The source file path when performing a PUT operation.
required: false required: false
default: null default: null
@ -416,17 +416,11 @@ def main():
if acl not in CannedACLStrings: if acl not in CannedACLStrings:
module.fail_json(msg='Unknown permission specified: %s' % str(acl)) 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): if module.boolean(overwrite):
overwrite = 'always' overwrite = 'always'
else: else:
overwrite='never' overwrite = 'never'
if overwrite not in ['always', 'never', 'different']:
if module.boolean(overwrite):
overwrite = 'always'
else:
overwrite='never'
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module) region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)