Author: | Jim Dalton |
---|
New in version 1.4.
Manage cache clusters in Amazon Elasticache. Returns information about the specified cache cluster.
parameter | required | default | choices | comments |
---|---|---|---|---|
aws_access_key | no | None | AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used. | |
aws_secret_key | no | None | AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. | |
cache_engine_version | no | 1.4.14 | The version number of the cache engine | |
cache_port | no | 11211 | The port number on which each of the cache nodes will accept connections | |
cache_security_groups | no | ['default'] | A list of cache security group names to associate with this cache cluster | |
engine | no | memcached | Name of the cache engine to be used (memcached or redis) | |
hard_modify | no |
|
Whether to destroy and recreate an existing cache cluster if necessary in order to modify its state | |
name | yes | The cache cluster identifier | ||
node_type | no | cache.m1.small | The compute and memory capacity of the nodes in the cache cluster | |
num_nodes | no | The initial number of cache nodes that the cache cluster will have | ||
region | no | The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used. | ||
state | yes |
|
absent or present are idempotent actions that will create or destroy a cache cluster as needed. rebooted will reboot the cluster, resulting in a momentary outage. |
|
wait | no | True |
|
Wait for cache cluster result before returning |
zone | no | None | The EC2 Availability Zone in which the cache cluster will be created |
Note
Requires boto
# Note: None of these examples set aws_access_key, aws_secret_key, or region.
# It is assumed that their matching environment variables are set.
# Basic example
- local_action:
module: elasticache
name: "test-please-delete"
state: present
engine: memcached
cache_engine_version: 1.4.14
node_type: cache.m1.small
num_nodes: 1
cache_port: 11211
cache_security_groups:
- default
zone: us-east-1d
# Ensure cache cluster is gone
- local_action:
module: elasticache
name: "test-please-delete"
state: absent
# Reboot cache cluster
- local_action:
module: elasticache
name: "test-please-delete"
state: rebooted