diff --git a/lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py b/lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py index 46a73ef339..2ade7972b5 100644 --- a/lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py +++ b/lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py @@ -28,6 +28,7 @@ description: - Returns information about the specified cache cluster. version_added: "2.3" author: "Sloane Hertel (@s-hertel)" +requirements: [ boto3, botocore ] options: group_family: description: diff --git a/lib/ansible/modules/cloud/amazon/elasticache_snapshot.py b/lib/ansible/modules/cloud/amazon/elasticache_snapshot.py index cb0f13fd52..3d64874c67 100644 --- a/lib/ansible/modules/cloud/amazon/elasticache_snapshot.py +++ b/lib/ansible/modules/cloud/amazon/elasticache_snapshot.py @@ -28,6 +28,7 @@ description: - Returns information about the specified snapshot. version_added: "2.3" author: "Sloane Hertel (@s-hertel)" +requirements: [ boto3, botocore ] options: name: description: @@ -135,6 +136,7 @@ try: except ImportError: HAS_BOTO3 = False + def create(module, connection, replication_id, cluster_id, name): """ Create an Elasticache backup. """ try: @@ -150,6 +152,7 @@ def create(module, connection, replication_id, cluster_id, name): module.fail_json(msg="Unable to create the snapshot.", exception=traceback.format_exc()) return response, changed + def copy(module, connection, name, target, bucket): """ Copy an Elasticache backup. """ try: @@ -161,6 +164,7 @@ def copy(module, connection, name, target, bucket): module.fail_json(msg="Unable to copy the snapshot.", exception=traceback.format_exc()) return response, changed + def delete(module, connection, name): """ Delete an Elasticache backup. """ try: @@ -198,7 +202,7 @@ def main(): name = module.params.get('name') state = module.params.get('state') - replication_id = module.params.get('replication_id') + replication_id = module.params.get('replication_id') cluster_id = module.params.get('cluster_id') target = module.params.get('target') bucket = module.params.get('bucket') @@ -206,7 +210,7 @@ def main(): # Retrieve any AWS settings from the environment. region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True) if not region: - module.fail_json(msg = str("Either region or AWS_REGION or EC2_REGION environment variable or boto config aws_region or ec2_region must be set.")) + module.fail_json(msg=str("Either region or AWS_REGION or EC2_REGION environment variable or boto config aws_region or ec2_region must be set.")) connection = boto3_conn(module, conn_type='client', resource='elasticache', region=region, diff --git a/test/sanity/pep8/legacy-files.txt b/test/sanity/pep8/legacy-files.txt index 7912b0adfe..e5085b5698 100644 --- a/test/sanity/pep8/legacy-files.txt +++ b/test/sanity/pep8/legacy-files.txt @@ -103,7 +103,6 @@ lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py lib/ansible/modules/cloud/amazon/efs.py lib/ansible/modules/cloud/amazon/efs_facts.py lib/ansible/modules/cloud/amazon/elasticache.py -lib/ansible/modules/cloud/amazon/elasticache_snapshot.py lib/ansible/modules/cloud/amazon/elasticache_subnet_group.py lib/ansible/modules/cloud/amazon/execute_lambda.py lib/ansible/modules/cloud/amazon/iam.py