elasticache: add requirements to parameter_group and snapshot (#24904)
* Add requirements to elasticache parameter group * add requirements for elasticache_snapshot * pep8 elasticache_snapshot * remove elasticache_snapshot from legacy files
This commit is contained in:
parent
727b8c80be
commit
7160a491c2
3 changed files with 7 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue