|
|
@ -17,7 +17,7 @@ DOCUMENTATION = '''
|
|
|
|
---
|
|
|
|
---
|
|
|
|
module: azure_rm_rediscache
|
|
|
|
module: azure_rm_rediscache
|
|
|
|
version_added: "2.8"
|
|
|
|
version_added: "2.8"
|
|
|
|
short_description: Manage Azure Cache for Redis instance.
|
|
|
|
short_description: Manage Azure Cache for Redis instance
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Create, update and delete instance of Azure Cache for Redis.
|
|
|
|
- Create, update and delete instance of Azure Cache for Redis.
|
|
|
|
|
|
|
|
|
|
|
@ -34,10 +34,12 @@ options:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Resource location. If not set, location from the resource group will be used as default.
|
|
|
|
- Resource location. If not set, location from the resource group will be used as default.
|
|
|
|
sku:
|
|
|
|
sku:
|
|
|
|
description: Sku info of Azure Cache for Redis.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- SKU info of Azure Cache for Redis.
|
|
|
|
suboptions:
|
|
|
|
suboptions:
|
|
|
|
name:
|
|
|
|
name:
|
|
|
|
description: Type of Azure Cache for Redis to deploy
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Type of Azure Cache for Redis to deploy.
|
|
|
|
choices:
|
|
|
|
choices:
|
|
|
|
- basic
|
|
|
|
- basic
|
|
|
|
- standard
|
|
|
|
- standard
|
|
|
@ -46,8 +48,8 @@ options:
|
|
|
|
size:
|
|
|
|
size:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Size of Azure Cache for Redis to deploy.
|
|
|
|
- Size of Azure Cache for Redis to deploy.
|
|
|
|
- When I(sku) is C(basic) or C(standard), allowed values are C0, C1, C2, C3, C4, C5, C6.
|
|
|
|
- When I(sku=basic) or I(sku=standard), allowed values are C(C0), C(C1), C(C2), C(C3), C(C4), C(C5), C(C6).
|
|
|
|
- When I(sku) is C(premium), allowed values are P1, P2, P3, P4.
|
|
|
|
- When I(sku=premium), allowed values are C(P1), C(P2), C(P3), C(P4).
|
|
|
|
- Please see U(https://docs.microsoft.com/en-us/rest/api/redis/redis/create#sku) for allowed values.
|
|
|
|
- Please see U(https://docs.microsoft.com/en-us/rest/api/redis/redis/create#sku) for allowed values.
|
|
|
|
choices:
|
|
|
|
choices:
|
|
|
|
- C0
|
|
|
|
- C0
|
|
|
@ -64,7 +66,7 @@ options:
|
|
|
|
required: True
|
|
|
|
required: True
|
|
|
|
enable_non_ssl_port:
|
|
|
|
enable_non_ssl_port:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- When true, the non-ssl redis server port 6379 will be enabled.
|
|
|
|
- When set I(enable_non_ssl_port=true), the non-ssl Redis server port 6379 will be enabled.
|
|
|
|
type: bool
|
|
|
|
type: bool
|
|
|
|
default: false
|
|
|
|
default: false
|
|
|
|
maxfragmentationmemory_reserved:
|
|
|
|
maxfragmentationmemory_reserved:
|
|
|
@ -92,7 +94,7 @@ options:
|
|
|
|
- Please see U(https://docs.microsoft.com/en-us/azure/redis-cache/cache-configure#advanced-settings) for more detail.
|
|
|
|
- Please see U(https://docs.microsoft.com/en-us/azure/redis-cache/cache-configure#advanced-settings) for more detail.
|
|
|
|
shard_count:
|
|
|
|
shard_count:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The number of shards to be created when I(sku) is C(premium).
|
|
|
|
- The number of shards to be created when I(sku=premium).
|
|
|
|
type: int
|
|
|
|
type: int
|
|
|
|
static_ip:
|
|
|
|
static_ip:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
@ -100,23 +102,27 @@ options:
|
|
|
|
subnet:
|
|
|
|
subnet:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Subnet in a virtual network to deploy the Azure Cache for Redis in.
|
|
|
|
- Subnet in a virtual network to deploy the Azure Cache for Redis in.
|
|
|
|
- "It can be resource id of subnet, eg.
|
|
|
|
- It can be resource id of subnet, for example
|
|
|
|
/subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1"
|
|
|
|
/subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1.
|
|
|
|
- It can be a dictionary where contains C(name), C(virtual_network_name) and C(resource_group).
|
|
|
|
- It can be a dictionary where contains I(name), I(virtual_network_name) and I(resource_group).
|
|
|
|
- C(name). Name of the subnet.
|
|
|
|
- I(name). Name of the subnet.
|
|
|
|
- C(resource_group). Resource group name of the subnet.
|
|
|
|
- I(resource_group). Resource group name of the subnet.
|
|
|
|
- C(virtual_network_name). Name of virtual network to which this subnet belongs.
|
|
|
|
- I(virtual_network_name). Name of virtual network to which this subnet belongs.
|
|
|
|
tenant_settings:
|
|
|
|
tenant_settings:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Dict of tenant settings.
|
|
|
|
- Dict of tenant settings.
|
|
|
|
|
|
|
|
type: dict
|
|
|
|
reboot:
|
|
|
|
reboot:
|
|
|
|
description: Reboot specified Redis node(s). There can be potential data loss.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Reboot specified Redis node(s). There can be potential data loss.
|
|
|
|
suboptions:
|
|
|
|
suboptions:
|
|
|
|
shard_id:
|
|
|
|
shard_id:
|
|
|
|
description: If clustering is enabled, the id of the shard to be rebooted.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- If clustering is enabled, the id of the shard to be rebooted.
|
|
|
|
type: int
|
|
|
|
type: int
|
|
|
|
reboot_type:
|
|
|
|
reboot_type:
|
|
|
|
description: Which Redis node(s) to reboot.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Which Redis node(s) to reboot.
|
|
|
|
choices:
|
|
|
|
choices:
|
|
|
|
- primary
|
|
|
|
- primary
|
|
|
|
- secondary
|
|
|
|
- secondary
|
|
|
@ -127,7 +133,8 @@ options:
|
|
|
|
- Regenerate Redis cache's access keys.
|
|
|
|
- Regenerate Redis cache's access keys.
|
|
|
|
suboptions:
|
|
|
|
suboptions:
|
|
|
|
key_type:
|
|
|
|
key_type:
|
|
|
|
description: The Redis key to regenerate.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- The Redis key to regenerate.
|
|
|
|
choices:
|
|
|
|
choices:
|
|
|
|
- primary
|
|
|
|
- primary
|
|
|
|
- secondary
|
|
|
|
- secondary
|
|
|
@ -135,7 +142,7 @@ options:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Wait till the Azure Cache for Redis instance provisioning_state is Succeeded.
|
|
|
|
- Wait till the Azure Cache for Redis instance provisioning_state is Succeeded.
|
|
|
|
- It takes several minutes for Azure Cache for Redis to be provisioned ready for use after creating/updating/rebooting.
|
|
|
|
- It takes several minutes for Azure Cache for Redis to be provisioned ready for use after creating/updating/rebooting.
|
|
|
|
- Set this option to true to wait for provisioning_state. Set to false if you don't care about provisioning_state.
|
|
|
|
- Set this option to C(true) to wait for provisioning_state. Set to C(false) if you don't care about provisioning_state.
|
|
|
|
- Poll wait timeout is 60 minutes.
|
|
|
|
- Poll wait timeout is 60 minutes.
|
|
|
|
type: bool
|
|
|
|
type: bool
|
|
|
|
default: True
|
|
|
|
default: True
|
|
|
@ -153,7 +160,7 @@ extends_documentation_fragment:
|
|
|
|
- azure_tags
|
|
|
|
- azure_tags
|
|
|
|
|
|
|
|
|
|
|
|
author:
|
|
|
|
author:
|
|
|
|
- "Yunge Zhu(@yungezz)"
|
|
|
|
- Yunge Zhu(@yungezz)
|
|
|
|
|
|
|
|
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
@ -197,19 +204,17 @@ EXAMPLES = '''
|
|
|
|
|
|
|
|
|
|
|
|
RETURN = '''
|
|
|
|
RETURN = '''
|
|
|
|
id:
|
|
|
|
id:
|
|
|
|
description: Id of the Azure Cache for Redis.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Id of the Azure Cache for Redis.
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
sample: {
|
|
|
|
sample: "/subscriptions/xxxxxxxx-xxxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Cache/Redis/myRedis"
|
|
|
|
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Cache/Redis/myRedis"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
host_name:
|
|
|
|
host_name:
|
|
|
|
description: Host name of the Azure Cache for Redis.
|
|
|
|
description:
|
|
|
|
returned: state is present
|
|
|
|
- Host name of the Azure Cache for Redis.
|
|
|
|
|
|
|
|
returned: when I(state=present)
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
sample: {
|
|
|
|
sample: "myredis.redis.cache.windows.net"
|
|
|
|
"host_name": "myredis.redis.cache.windows.net"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|