1
0
Fork 0
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:
Zim Kalinowski 2019-03-21 02:12:17 +08:00 committed by Alicia Cozine
parent ed9c7c9fb8
commit 7b75563c9b
7 changed files with 43 additions and 33 deletions

View file

@ -55,7 +55,7 @@ EXAMPLES = '''
- name: Create application security group - name: Create application security group
azure_rm_applicationsecuritygroup: azure_rm_applicationsecuritygroup:
resource_group: myResourceGroup resource_group: myResourceGroup
name: MyAsg name: mySecurityGroup
location: eastus location: eastus
tags: tags:
foo: bar foo: bar
@ -67,7 +67,8 @@ id:
- Resource id of the application security group. - Resource id of the application security group.
returned: always returned: always
type: str 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 from ansible.module_utils.azure_rm_common import AzureRMModuleBase

View file

@ -73,25 +73,25 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Create a windows app service plan - name: Create a windows app service plan
azure_rm_appserviceplan: azure_rm_appserviceplan:
name: "windowsplan1"
resource_group: myResourceGroup resource_group: myResourceGroup
location: "eastus" name: myAppPlan
location: eastus
sku: S1 sku: S1
- name: Create a linux app service plan - name: Create a linux app service plan
azure_rm_appserviceplan: azure_rm_appserviceplan:
resource_group: myResourceGroup resource_group: myResourceGroup
name: "linuxplan1" name: myAppPlan
location: "eastus" location: eastus
sku: S1 sku: S1
is_linux: true is_linux: true
number_of_workers: 1 number_of_workers: 1
- name: update sku of existing windows app service plan - name: update sku of existing windows app service plan
azure_rm_appserviceplan: azure_rm_appserviceplan:
name: "windowsplan2"
resource_group: myResourceGroup resource_group: myResourceGroup
location: "eastus" name: myAppPlan
location: eastus
sku: S2 sku: S2
''' '''
@ -101,7 +101,7 @@ azure_appserviceplan:
returned: always returned: always
type: dict type: dict
sample: { 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"
} }
''' '''

View file

@ -202,7 +202,7 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Create an auto scale - name: Create an auto scale
azure_rm_autoscale: 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 enabled: true
profiles: profiles:
- count: '1' - count: '1'
@ -222,7 +222,8 @@ EXAMPLES = '''
- name: Create an auto scale with compicated profile - name: Create an auto scale with compicated profile
azure_rm_autoscale: 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 enabled: true
profiles: profiles:
- count: '1' - count: '1'
@ -234,7 +235,8 @@ EXAMPLES = '''
time_window: 10 time_window: 10
direction: Increase direction: Increase
metric_name: Percentage CPU 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' value: '1'
threshold: 70 threshold: 70
cooldown: 5 cooldown: 5
@ -273,7 +275,7 @@ state:
sample: { sample: {
"changed": false, "changed": false,
"enabled": true, "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", "location": "eastus",
"name": "scale", "name": "scale",
"notifications": [ "notifications": [
@ -308,7 +310,8 @@ state:
"cooldown": 5.0, "cooldown": 5.0,
"direction": "Increase", "direction": "Increase",
"metric_name": "Percentage CPU", "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", "operator": "GreaterThan",
"statistic": "Average", "statistic": "Average",
"threshold": 70.0, "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 ''' # NOQA

View file

@ -59,7 +59,7 @@ autoscales:
type: list type: list
sample: [{ sample: [{
"enabled": true, "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", "location": "eastus",
"name": "scale", "name": "scale",
"notifications": [ "notifications": [
@ -94,7 +94,8 @@ autoscales:
"cooldown": 5.0, "cooldown": 5.0,
"direction": "Increase", "direction": "Increase",
"metric_name": "Percentage CPU", "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", "operator": "GreaterThan",
"statistic": "Average", "statistic": "Average",
"threshold": 70.0, "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"
}] }]
''' '''

View file

@ -125,8 +125,8 @@ EXAMPLES = '''
- name: Create a Azure CDN endpoint - name: Create a Azure CDN endpoint
azure_rm_cdnendpoint: azure_rm_cdnendpoint:
resource_group: myResourceGroup resource_group: myResourceGroup
name: TestEndpoint profile_name: myProfile
profile_name: TestProfile name: myEndpoint
origins: origins:
- name: TestOrig - name: TestOrig
host_name: "www.example.com" host_name: "www.example.com"
@ -137,8 +137,8 @@ EXAMPLES = '''
- name: Delete a Azure CDN endpoint - name: Delete a Azure CDN endpoint
azure_rm_cdnendpoint: azure_rm_cdnendpoint:
resource_group: myResourceGroup resource_group: myResourceGroup
name: TestEndpoint profile_name: myProfile
profile_name: TestProfile name: myEndpoint
state: absent state: absent
''' '''
RETURN = ''' RETURN = '''
@ -151,7 +151,8 @@ id:
- Id of the CDN endpoint. - Id of the CDN endpoint.
returned: always returned: always
type: str 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: host_name:
description: description:
- Host name of the CDN endpoint. - Host name of the CDN endpoint.

View file

@ -132,7 +132,7 @@ EXAMPLES = '''
- name: Create a redis cache - name: Create a redis cache
azure_rm_rediscache: azure_rm_rediscache:
resource_group: myResourceGroup resource_group: myResourceGroup
name: myRedisCache name: myRedis
sku: sku:
name: basic name: basic
size: C1 size: C1
@ -141,7 +141,7 @@ EXAMPLES = '''
- name: Scale up the redis cache - name: Scale up the redis cache
azure_rm_rediscache: azure_rm_rediscache:
resource_group: myResourceGroup resource_group: myResourceGroup
name: myRedisCache name: myRedis
sku: sku:
name: standard name: standard
size: C1 size: C1
@ -151,11 +151,12 @@ EXAMPLES = '''
- name: Create redis with subnet - name: Create redis with subnet
azure_rm_rediscache: azure_rm_rediscache:
resource_group: myResourceGroup resource_group: myResourceGroup
name: myRedisCache2 name: myRedis
sku: sku:
name: premium name: premium
size: P1 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 returned: always
type: str type: str
sample: { 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: host_name:
description: Host name of the redis cache. description: Host name of the redis cache.
returned: state is present returned: state is present
type: str type: str
sample: { sample: {
"host_name": "redis1.redis.cache.windows.net" "host_name": "myredis.redis.cache.windows.net"
} }
''' '''

View file

@ -75,19 +75,19 @@ rediscaches:
- Name of a resource group where the Azure Redis Cache belongs to. - Name of a resource group where the Azure Redis Cache belongs to.
returned: always returned: always
type: str type: str
sample: testGroup sample: myResourceGroup
name: name:
description: description:
- Name of the Azure Redis Cache. - Name of the Azure Redis Cache.
returned: always returned: always
type: str type: str
sample: testRedis sample: myRedis
id: id:
description: description:
- Id of the Azure Redis Cache. - Id of the Azure Redis Cache.
returned: always returned: always
type: str 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: provisioning_state:
description: description:
- Provisioning state of the redis cahe - 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. - The full resource ID of a subnet in a virtual network to deploy the Redis cache in.
type: str type: str
sample: 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: configuration:
description: description:
- Dict of redis configuration. - Dict of redis configuration.