mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Azure modules: more doc updates (#54077)
* more doc updates * fixed sanity
This commit is contained in:
parent
ed9c7c9fb8
commit
7b75563c9b
7 changed files with 43 additions and 33 deletions
|
@ -55,7 +55,7 @@ EXAMPLES = '''
|
|||
- name: Create application security group
|
||||
azure_rm_applicationsecuritygroup:
|
||||
resource_group: myResourceGroup
|
||||
name: MyAsg
|
||||
name: mySecurityGroup
|
||||
location: eastus
|
||||
tags:
|
||||
foo: bar
|
||||
|
@ -67,7 +67,8 @@ id:
|
|||
- Resource id of the application security group.
|
||||
returned: always
|
||||
type: str
|
||||
sample: /subscriptions/<subid>/resourceGroups/<resourcegroup>/providers/Microsoft.Network/applicationSecurityGroups/MyAsg
|
||||
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationSecurityGroups/
|
||||
mySecurityGroup"
|
||||
'''
|
||||
|
||||
from ansible.module_utils.azure_rm_common import AzureRMModuleBase
|
||||
|
|
|
@ -73,25 +73,25 @@ author:
|
|||
EXAMPLES = '''
|
||||
- name: Create a windows app service plan
|
||||
azure_rm_appserviceplan:
|
||||
name: "windowsplan1"
|
||||
resource_group: myResourceGroup
|
||||
location: "eastus"
|
||||
name: myAppPlan
|
||||
location: eastus
|
||||
sku: S1
|
||||
|
||||
- name: Create a linux app service plan
|
||||
azure_rm_appserviceplan:
|
||||
resource_group: myResourceGroup
|
||||
name: "linuxplan1"
|
||||
location: "eastus"
|
||||
name: myAppPlan
|
||||
location: eastus
|
||||
sku: S1
|
||||
is_linux: true
|
||||
number_of_workers: 1
|
||||
|
||||
- name: update sku of existing windows app service plan
|
||||
azure_rm_appserviceplan:
|
||||
name: "windowsplan2"
|
||||
resource_group: myResourceGroup
|
||||
location: "eastus"
|
||||
name: myAppPlan
|
||||
location: eastus
|
||||
sku: S2
|
||||
'''
|
||||
|
||||
|
@ -101,7 +101,7 @@ azure_appserviceplan:
|
|||
returned: always
|
||||
type: dict
|
||||
sample: {
|
||||
"id": "/subscriptions/<subs_id>/resourceGroups/ansiblewebapp1_plan/providers/Microsoft.Web/serverfarms/win_appplan11"
|
||||
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Web/serverfarms/myAppPlan"
|
||||
}
|
||||
'''
|
||||
|
||||
|
|
|
@ -202,7 +202,7 @@ author:
|
|||
EXAMPLES = '''
|
||||
- name: Create an auto scale
|
||||
azure_rm_autoscale:
|
||||
target: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss"
|
||||
target: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"
|
||||
enabled: true
|
||||
profiles:
|
||||
- count: '1'
|
||||
|
@ -222,7 +222,8 @@ EXAMPLES = '''
|
|||
|
||||
- name: Create an auto scale with compicated profile
|
||||
azure_rm_autoscale:
|
||||
target: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss"
|
||||
target: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets
|
||||
/myVmss"
|
||||
enabled: true
|
||||
profiles:
|
||||
- count: '1'
|
||||
|
@ -234,7 +235,8 @@ EXAMPLES = '''
|
|||
time_window: 10
|
||||
direction: Increase
|
||||
metric_name: Percentage CPU
|
||||
metric_resource_uri: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss"
|
||||
metric_resource_uri: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtua
|
||||
lMachineScaleSets/vmss"
|
||||
value: '1'
|
||||
threshold: 70
|
||||
cooldown: 5
|
||||
|
@ -273,7 +275,7 @@ state:
|
|||
sample: {
|
||||
"changed": false,
|
||||
"enabled": true,
|
||||
"id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/microsoft.insights/autoscalesettings/scale",
|
||||
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/microsoft.insights/autoscalesettings/scale",
|
||||
"location": "eastus",
|
||||
"name": "scale",
|
||||
"notifications": [
|
||||
|
@ -308,7 +310,8 @@ state:
|
|||
"cooldown": 5.0,
|
||||
"direction": "Increase",
|
||||
"metric_name": "Percentage CPU",
|
||||
"metric_resource_uri": "/subscriptions/X/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss",
|
||||
"metric_resource_uri": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsof
|
||||
t.Compute/virtualMachineScaleSets/MyVmss",
|
||||
"operator": "GreaterThan",
|
||||
"statistic": "Average",
|
||||
"threshold": 70.0,
|
||||
|
@ -321,7 +324,8 @@ state:
|
|||
]
|
||||
}
|
||||
],
|
||||
"target": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss"
|
||||
"target": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScale
|
||||
Sets/myVmss"
|
||||
}
|
||||
''' # NOQA
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ autoscales:
|
|||
type: list
|
||||
sample: [{
|
||||
"enabled": true,
|
||||
"id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/microsoft.insights/autoscalesettings/scale",
|
||||
"id": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/myResourceGroup/providers/microsoft.insights/autoscalesettings/scale",
|
||||
"location": "eastus",
|
||||
"name": "scale",
|
||||
"notifications": [
|
||||
|
@ -94,7 +94,8 @@ autoscales:
|
|||
"cooldown": 5.0,
|
||||
"direction": "Increase",
|
||||
"metric_name": "Percentage CPU",
|
||||
"metric_resource_uri": "/subscriptions/XX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss",
|
||||
"metric_resource_uri": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsof
|
||||
t.Compute/virtualMachineScaleSets/myVmss",
|
||||
"operator": "GreaterThan",
|
||||
"statistic": "Average",
|
||||
"threshold": 70.0,
|
||||
|
@ -107,7 +108,8 @@ autoscales:
|
|||
]
|
||||
}
|
||||
],
|
||||
"target": "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Compute/virtualMachineScaleSets/vmss"
|
||||
"target": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScale
|
||||
Sets/myVmss"
|
||||
}]
|
||||
|
||||
'''
|
||||
|
|
|
@ -125,8 +125,8 @@ EXAMPLES = '''
|
|||
- name: Create a Azure CDN endpoint
|
||||
azure_rm_cdnendpoint:
|
||||
resource_group: myResourceGroup
|
||||
name: TestEndpoint
|
||||
profile_name: TestProfile
|
||||
profile_name: myProfile
|
||||
name: myEndpoint
|
||||
origins:
|
||||
- name: TestOrig
|
||||
host_name: "www.example.com"
|
||||
|
@ -137,8 +137,8 @@ EXAMPLES = '''
|
|||
- name: Delete a Azure CDN endpoint
|
||||
azure_rm_cdnendpoint:
|
||||
resource_group: myResourceGroup
|
||||
name: TestEndpoint
|
||||
profile_name: TestProfile
|
||||
profile_name: myProfile
|
||||
name: myEndpoint
|
||||
state: absent
|
||||
'''
|
||||
RETURN = '''
|
||||
|
@ -151,7 +151,8 @@ id:
|
|||
- Id of the CDN endpoint.
|
||||
returned: always
|
||||
type: str
|
||||
sample: "/subscriptions/<subs_id>/resourcegroups/xxx/providers/Microsoft.Cdn/profiles/xxx/endpoints/xxx"
|
||||
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/myResourceGroup/providers/Microsoft.Cdn/profiles/myProfile/endpoints/
|
||||
myEndpoint"
|
||||
host_name:
|
||||
description:
|
||||
- Host name of the CDN endpoint.
|
||||
|
|
|
@ -132,7 +132,7 @@ EXAMPLES = '''
|
|||
- name: Create a redis cache
|
||||
azure_rm_rediscache:
|
||||
resource_group: myResourceGroup
|
||||
name: myRedisCache
|
||||
name: myRedis
|
||||
sku:
|
||||
name: basic
|
||||
size: C1
|
||||
|
@ -141,7 +141,7 @@ EXAMPLES = '''
|
|||
- name: Scale up the redis cache
|
||||
azure_rm_rediscache:
|
||||
resource_group: myResourceGroup
|
||||
name: myRedisCache
|
||||
name: myRedis
|
||||
sku:
|
||||
name: standard
|
||||
size: C1
|
||||
|
@ -151,11 +151,12 @@ EXAMPLES = '''
|
|||
- name: Create redis with subnet
|
||||
azure_rm_rediscache:
|
||||
resource_group: myResourceGroup
|
||||
name: myRedisCache2
|
||||
name: myRedis
|
||||
sku:
|
||||
name: premium
|
||||
size: P1
|
||||
subnet: /subscriptions/<subs_id>/resourceGroups/redistest1/providers/Microsoft.Network/virtualNetworks/testredisvnet1/subnets/subnet1
|
||||
subnet: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirt
|
||||
ualNetwork/subnets/mySubnet"
|
||||
|
||||
'''
|
||||
|
||||
|
@ -165,14 +166,14 @@ id:
|
|||
returned: always
|
||||
type: str
|
||||
sample: {
|
||||
"id": "/subscriptions/<subs_id>/resourceGroups/rg/providers/Microsoft.Cache/Redis/redis1"
|
||||
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Cache/Redis/myRedis"
|
||||
}
|
||||
host_name:
|
||||
description: Host name of the redis cache.
|
||||
returned: state is present
|
||||
type: str
|
||||
sample: {
|
||||
"host_name": "redis1.redis.cache.windows.net"
|
||||
"host_name": "myredis.redis.cache.windows.net"
|
||||
}
|
||||
'''
|
||||
|
||||
|
|
|
@ -75,19 +75,19 @@ rediscaches:
|
|||
- Name of a resource group where the Azure Redis Cache belongs to.
|
||||
returned: always
|
||||
type: str
|
||||
sample: testGroup
|
||||
sample: myResourceGroup
|
||||
name:
|
||||
description:
|
||||
- Name of the Azure Redis Cache.
|
||||
returned: always
|
||||
type: str
|
||||
sample: testRedis
|
||||
sample: myRedis
|
||||
id:
|
||||
description:
|
||||
- Id of the Azure Redis Cache.
|
||||
returned: always
|
||||
type: str
|
||||
sample: /subscriptions/<subs_id>/resourceGroups/myResourceGroup/providers/Microsoft.Cache/Redis/myRedis
|
||||
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Cache/Redis/myRedis
|
||||
provisioning_state:
|
||||
description:
|
||||
- Provisioning state of the redis cahe
|
||||
|
@ -129,7 +129,8 @@ rediscaches:
|
|||
- The full resource ID of a subnet in a virtual network to deploy the Redis cache in.
|
||||
type: str
|
||||
sample:
|
||||
- /subscriptions/<subid>/resourceGroups/myResourceGroup/Microsoft.Network|ClassicNetwork/VirtualNetworks/vnet1/subnets/subnet1
|
||||
- "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/Microsoft.Network/VirtualNetworks/myVirtualNetwo
|
||||
rk/subnets/mySubnet"
|
||||
configuration:
|
||||
description:
|
||||
- Dict of redis configuration.
|
||||
|
|
Loading…
Reference in a new issue