mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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.
|
- Returns information about the specified cache cluster.
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
author: "Sloane Hertel (@s-hertel)"
|
author: "Sloane Hertel (@s-hertel)"
|
||||||
|
requirements: [ boto3, botocore ]
|
||||||
options:
|
options:
|
||||||
group_family:
|
group_family:
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -28,6 +28,7 @@ description:
|
||||||
- Returns information about the specified snapshot.
|
- Returns information about the specified snapshot.
|
||||||
version_added: "2.3"
|
version_added: "2.3"
|
||||||
author: "Sloane Hertel (@s-hertel)"
|
author: "Sloane Hertel (@s-hertel)"
|
||||||
|
requirements: [ boto3, botocore ]
|
||||||
options:
|
options:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
|
@ -135,6 +136,7 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_BOTO3 = False
|
HAS_BOTO3 = False
|
||||||
|
|
||||||
|
|
||||||
def create(module, connection, replication_id, cluster_id, name):
|
def create(module, connection, replication_id, cluster_id, name):
|
||||||
""" Create an Elasticache backup. """
|
""" Create an Elasticache backup. """
|
||||||
try:
|
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())
|
module.fail_json(msg="Unable to create the snapshot.", exception=traceback.format_exc())
|
||||||
return response, changed
|
return response, changed
|
||||||
|
|
||||||
|
|
||||||
def copy(module, connection, name, target, bucket):
|
def copy(module, connection, name, target, bucket):
|
||||||
""" Copy an Elasticache backup. """
|
""" Copy an Elasticache backup. """
|
||||||
try:
|
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())
|
module.fail_json(msg="Unable to copy the snapshot.", exception=traceback.format_exc())
|
||||||
return response, changed
|
return response, changed
|
||||||
|
|
||||||
|
|
||||||
def delete(module, connection, name):
|
def delete(module, connection, name):
|
||||||
""" Delete an Elasticache backup. """
|
""" Delete an Elasticache backup. """
|
||||||
try:
|
try:
|
||||||
|
@ -206,7 +210,7 @@ def main():
|
||||||
# Retrieve any AWS settings from the environment.
|
# Retrieve any AWS settings from the environment.
|
||||||
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
|
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
|
||||||
if not region:
|
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',
|
connection = boto3_conn(module, conn_type='client',
|
||||||
resource='elasticache', region=region,
|
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.py
|
||||||
lib/ansible/modules/cloud/amazon/efs_facts.py
|
lib/ansible/modules/cloud/amazon/efs_facts.py
|
||||||
lib/ansible/modules/cloud/amazon/elasticache.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/elasticache_subnet_group.py
|
||||||
lib/ansible/modules/cloud/amazon/execute_lambda.py
|
lib/ansible/modules/cloud/amazon/execute_lambda.py
|
||||||
lib/ansible/modules/cloud/amazon/iam.py
|
lib/ansible/modules/cloud/amazon/iam.py
|
||||||
|
|
Loading…
Reference in a new issue