improving consistency of azure examples/documentation (#52571)

* normalizing naming in examples

* fixed line too long
This commit is contained in:
Zim Kalinowski 2019-02-20 01:57:04 +08:00 committed by Alicia Cozine
parent f9139be5e6
commit 628f62c571
26 changed files with 73 additions and 69 deletions

View file

@ -133,7 +133,7 @@ EXAMPLES = '''
azure_rm_acs:
name: acctestcontservice1
location: eastus
resource_group: Testing
resource_group: myResourceGroup
orchestration_platform: Kubernetes
master_profile:
- count: 3
@ -158,7 +158,7 @@ EXAMPLES = '''
azure_rm_acs:
name: acctestcontservice2
location: eastus
resource_group: Testing
resource_group: myResourceGroup
orchestration_platform: DCOS
master_profile:
- count: 3
@ -180,7 +180,7 @@ EXAMPLES = '''
azure_rm_acs:
name: acctestcontservice3
location: eastus
resource_group: Testing
resource_group: myResourceGroup
orchestration_platform: Swarm
master_profile:
- count: 3
@ -206,7 +206,7 @@ EXAMPLES = '''
azure_rm_acs:
name: acctestcontservice3
location: eastus
resource_group: Testing
resource_group: myResourceGroup
state: absent
orchestration_platform: Swarm
master_profile:

View file

@ -112,7 +112,7 @@ EXAMPLES = '''
azure_rm_aks:
name: acctestaks1
location: eastus
resource_group: Testing
resource_group: myResourceGroup
dns_prefix: akstest
linux_profile:
admin_username: azureuser
@ -130,7 +130,7 @@ EXAMPLES = '''
- name: Remove a managed Azure Container Services (AKS) instance
azure_rm_aks:
name: acctestaks3
resource_group: Testing
resource_group: myResourceGroup
state: absent
'''
RETURN = '''

View file

@ -45,7 +45,7 @@ EXAMPLES = '''
- name: Get facts for one Azure Kubernetes Service
azure_rm_aks_facts:
name: Testing
resource_group: TestRG
resource_group: myResourceGroup
- name: Get facts for all Azure Kubernetes Services
azure_rm_aks_facts:

View file

@ -376,7 +376,7 @@ author:
EXAMPLES = '''
- name: Create instance of Application Gateway
azure_rm_appgateway:
resource_group: myresourcegroup
resource_group: myResourceGroup
name: myappgateway
sku:
name: standard_small

View file

@ -54,7 +54,7 @@ author:
EXAMPLES = '''
- name: Create application security group
azure_rm_applicationsecuritygroup:
resource_group: myRG
resource_group: myResourceGroup
name: MyAsg
location: eastus
tags:

View file

@ -74,13 +74,13 @@ EXAMPLES = '''
- name: Create a windows app service plan
azure_rm_appserviceplan:
name: "windowsplan1"
resource_group: "appserviceplan_rg"
resource_group: myResourceGroup
location: "eastus"
sku: S1
- name: Create a linux app service plan
azure_rm_appserviceplan:
resource_group: "appserviceplan_rg"
resource_group: myResourceGroup
name: "linuxplan1"
location: "eastus"
sku: S1
@ -90,7 +90,7 @@ EXAMPLES = '''
- name: update sku of existing windows app service plan
azure_rm_appserviceplan:
name: "windowsplan2"
resource_group: "appserviceplan_rg"
resource_group: myResourceGroup
location: "eastus"
sku: S2
'''

View file

@ -45,12 +45,12 @@ author:
EXAMPLES = '''
- name: Get facts for app service plan by name
azure_rm_appserviceplan_facts:
resource_group: testrg
resource_group: myResourceGroup
name: winwebapp1
- name: Get azure_rm_appserviceplan_facts for app service plan in resource group
azure_rm_webapp_facts:
resource_group: testrg
resource_group: myResourceGroup
- name: Get facts for app service plan with tags
azure_rm_appserviceplan_facts:
@ -69,7 +69,7 @@ appserviceplans:
description: Id of the app service plan.
returned: always
type: str
sample: /subscriptions/xxxx/resourceGroupsxxx/providers/Microsoft.Web/serverfarms/xxx
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Web/serverfarms/myPlan
name:
description: Name of the app service plan.
returned: always
@ -78,6 +78,7 @@ appserviceplans:
description: Resource group of the app service plan.
returned: always
type: str
sample: myResourceGroup
location:
description: Location of the app service plan.
returned: always

View file

@ -218,7 +218,7 @@ EXAMPLES = '''
recurrence_hours:
- '18'
name: scale
resource_group: foo
resource_group: myResourceGroup
- name: Create an auto scale with compicated profile
azure_rm_autoscale:
@ -256,12 +256,12 @@ EXAMPLES = '''
custom_emails:
- yuwzho@microsoft.com
name: scale
resource_group: foo
resource_group: myResourceGroup
- name: Delete an Azure Auto Scale Setting
azure_rm_autoscale:
state: absent
resource_group: foo
resource_group: myResourceGroup
name: scale
'''

View file

@ -44,12 +44,12 @@ author:
EXAMPLES = '''
- name: Get instance of Auto Scale Setting
azure_rm_autoscale_facts:
resource_group: resource_group_name
resource_group: myResourceGroup
name: auto_scale_name
- name: List instances of Auto Scale Setting
azure_rm_autoscale_facts:
resource_group: resource_group_name
resource_group: myResourceGroup
'''
RETURN = '''

View file

@ -72,13 +72,13 @@ EXAMPLES = '''
azure_rm_availabilityset:
name: myavailabilityset
location: eastus
resource_group: Testing
resource_group: myResourceGroup
- name: Create an availability set with advanced options
azure_rm_availabilityset:
name: myavailabilityset
location: eastus
resource_group: Testing
resource_group: myResourceGroup
platform_update_domain_count: 5
platform_fault_domain_count: 3
sku: Aligned
@ -87,7 +87,7 @@ EXAMPLES = '''
azure_rm_availabilityset:
name: myavailabilityset
location: eastus
resource_group: Testing
resource_group: myResourceGroup
state: absent
'''

View file

@ -44,11 +44,11 @@ EXAMPLES = '''
- name: Get facts for one availability set
azure_rm_availabilityset_facts:
name: Testing
resource_group: TestRG
resource_group: myResourceGroup
- name: Get facts for all availability sets in a specific resource group
azure_rm_availabilityset_facts:
resource_group: TestRG
resource_group: myResourceGroup
'''

View file

@ -124,7 +124,7 @@ author:
EXAMPLES = '''
- name: Create a Azure CDN endpoint
azure_rm_cdnendpoint:
resource_group: TestRg
resource_group: myResourceGroup
name: TestEndpoint
profile_name: TestProfile
origins:
@ -136,7 +136,7 @@ EXAMPLES = '''
foo: bar
- name: Delete a Azure CDN endpoint
azure_rm_cdnendpoint:
resource_group: TestRg
resource_group: myResourceGroup
name: TestEndpoint
profile_name: TestProfile
state: absent

View file

@ -62,7 +62,7 @@ author:
EXAMPLES = '''
- name: Create a CDN profile
azure_rm_cdnprofile:
resource_group: Testing
resource_group: myResourceGroup
name: cdntest
sku: standard_akamai
tags:
@ -70,7 +70,7 @@ EXAMPLES = '''
- name: Delete the CDN profile
azure_rm_cdnprofile:
resource_group: Testing
resource_group: myResourceGroup
name: cdntest
state: absent
'''

View file

@ -46,7 +46,7 @@ EXAMPLES = '''
- name: Get facts for one CDN profile
azure_rm_cdnprofile_facts:
name: Testing
resource_group: TestRG
resource_group: myResourceGroup
- name: Get facts for all CDN profiles
azure_rm_cdnprofile_facts:
@ -68,7 +68,7 @@ cdnprofiles:
- Name of a resource group where the CDN profile exists.
returned: always
type: str
sample: testGroup
sample: myResourceGroup
name:
description:
- Name of the CDN profile.
@ -84,7 +84,7 @@ cdnprofiles:
description:
- ID of the CDN profile.
type: str
sample: /subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourcegroups/cdntest/providers/Microsoft.Cdn/profiles/cdntest
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/myResourceGroup/providers/Microsoft.Cdn/profiles/cdntest
provisioning_state:
description:
- Provisioning status of the profile.

View file

@ -107,7 +107,7 @@ author:
EXAMPLES = '''
- name: Create sample container group
azure_rm_containerinstance:
resource_group: testrg
resource_group: myResourceGroup
name: mynewcontainergroup
os_type: linux
ip_address: public
@ -127,7 +127,7 @@ id:
- Resource ID
returned: always
type: str
sample: /subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.ContainerInstance/containerGroups/aci1b6dd89
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroups/aci1b6dd89
provisioning_state:
description:
- Provisioning state of the container.

View file

@ -44,12 +44,12 @@ author:
EXAMPLES = '''
- name: Get specific Container Instance facts
azure_rm_containerinstance_facts:
resource_group: resource_group_name
resource_group: myResourceGroup
name: container_group_name
- name: List Container Instances in a specified resource group name
azure_rm_containerinstance_facts:
resource_group: resource_group_name
resource_group: myResourceGroup
'''
RETURN = '''

View file

@ -66,7 +66,7 @@ EXAMPLES = '''
azure_rm_containerregistry:
name: testacr1
location: eastus
resource_group: testrg
resource_group: myResourceGroup
state: present
admin_user_enabled: true
sku: Premium
@ -77,7 +77,7 @@ EXAMPLES = '''
- name: Remove an azure container registry
azure_rm_containerregistry:
name: testacr2
resource_group: testrg
resource_group: myResourceGroup
state: absent
'''
RETURN = '''
@ -86,7 +86,7 @@ id:
- Resource ID
returned: always
type: str
sample: /subscriptions/00000000-0000-0000-0000-000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry
name:
description:
- Registry name

View file

@ -49,12 +49,12 @@ author:
EXAMPLES = '''
- name: Get instance of Registry
azure_rm_containerregistry_facts:
resource_group: sampleresourcegroup
resource_group: myResourceGroup
name: sampleregistry
- name: List instances of Registry
azure_rm_containerregistry_facts:
resource_group: sampleresourcegroup
resource_group: myResourceGroup
'''
RETURN = '''

View file

@ -147,7 +147,7 @@ author:
EXAMPLES = '''
- name: Create Cosmos DB Account - min
azure_rm_cosmosdbaccount:
resource_group: testResourceGroup
resource_group: myResourceGroup
name: ddb1
location: westus
geo_rep_locations:
@ -157,7 +157,7 @@ EXAMPLES = '''
- name: Create Cosmos DB Account - max
azure_rm_cosmosdbaccount:
resource_group: testResourceGroup
resource_group: myResourceGroup
name: ddb1
location: westus
kind: mongo_db
@ -181,7 +181,7 @@ id:
- The unique resource identifier of the database account.
returned: always
type: str
sample: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccounts/ddb1
'''
import time

View file

@ -54,12 +54,12 @@ author:
EXAMPLES = '''
- name: Get instance of Database Account
azure_rm_cosmosdbaccount_facts:
resource_group: testrg
resource_group: myResourceGroup
name: testaccount
- name: List instances of Database Account
azure_rm_cosmosdbaccousnt_facts:
resource_group: testrg
resource_group: myResourceGroup
'''
RETURN = '''
@ -73,13 +73,14 @@ accounts:
- The unique resource identifier of the database account.
returned: always
type: str
sample: /subscriptions/subid/resourceGroups/testrg/providers/Microsoft.DocumentDB/databaseAccounts/testaccount
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.DocumentDB/databaseAccount
s/testaccount"
resource_group:
description:
- Name of an Azure resource group.
returned: always
type: str
sample: testrg
sample: myResourceGroup
name:
description:
- The name of the database account.
@ -269,7 +270,8 @@ accounts:
description:
- Resource id of a subnet.
type: str
sample: /subscriptions/subid/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet1
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNet
works/testvnet/subnets/testsubnet1"
ignore_missing_vnet_service_endpoint:
description:
- Create Cosmos DB account without existing virtual network service endpoint.

View file

@ -64,7 +64,7 @@ author:
EXAMPLES = '''
- name: Create (or update) DevTest Lab
azure_rm_devtestlab:
resource_group: testrg
resource_group: myResourceGroup
name: mylab
storage_type: standard
'''
@ -75,7 +75,7 @@ id:
- The identifier of the resource.
returned: always
type: str
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/testrg/providers/microsoft.devtestlab/labs/mylab
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/myResourceGroup/providers/microsoft.devtestlab/labs/mylab
'''
import time

View file

@ -61,7 +61,7 @@ author:
EXAMPLES = '''
- name: Create (or update) Virtual Network
azure_rm_devtestlabvirtualnetwork:
resource_group: testrg
resource_group: myResourceGroup
lab_name: mylab
name: myvn
description: My Lab Virtual Network

View file

@ -103,7 +103,7 @@ EXAMPLES = '''
- name: ensure an "A" record set with multiple records
azure_rm_dnsrecordset:
resource_group: Testing
resource_group: myResourceGroup
relative_name: www
zone_name: testing.com
record_type: A
@ -115,7 +115,7 @@ EXAMPLES = '''
- name: delete a record set
azure_rm_dnsrecordset:
resource_group: Testing
resource_group: myResourceGroup
record_type: A
relative_name: www
zone_name: testing.com
@ -123,7 +123,7 @@ EXAMPLES = '''
- name: create multiple "A" record sets with multiple records
azure_rm_dnsrecordset:
resource_group: Testing
resource_group: myResourceGroup
zone_name: testing.com
state: present
relative_name: "{{ item.name }}"
@ -136,7 +136,7 @@ EXAMPLES = '''
- name: create SRV records in a new record set
azure_rm_dnsrecordset:
resource_group: Testing
resource_group: myResourceGroup
relative_name: _sip._tcp.testing.com
zone_name: testing.com
time_to_live: 7200
@ -151,7 +151,7 @@ EXAMPLES = '''
- name: create PTR record in a new record set
azure_rm_dnsrecordset:
resource_group: Testing
resource_group: myResourceGroup
relative_name: 192.168.100.101.in-addr.arpa
zone_name: testing.com
record_type: PTR
@ -160,7 +160,7 @@ EXAMPLES = '''
- name: create TXT record in a new record set
azure_rm_dnsrecordset:
resource_group: Testing
resource_group: myResourceGroup
relative_name: mail.testing.com
zone_name: testing.com
record_type: TXT

View file

@ -52,18 +52,18 @@ author:
EXAMPLES = '''
- name: Get facts for one Record Set
azure_rm_dnsrecordset_facts:
resource_group: Testing
resource_group: myResourceGroup
zone_name: example.com
relative_name: server10
record_type: A
- name: Get facts for all Type A Record Sets in a Zone
azure_rm_dnsrecordset_facts:
resource_group: Testing
resource_group: myResourceGroup
zone_name: example.com
record_type: A
- name: Get all record sets in one zone
azure_rm_dnsrecordset_facts:
resource_group: Testing
resource_group: myResourceGroup
zone_name: example.com
'''
@ -98,7 +98,8 @@ dnsrecordsets:
contains:
id:
description: ID of the dns recordset.
sample: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/testing/providers/Microsoft.Network/dnszones/newzone.com/A/servera"
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/dnszones/newzone.
com/A/servera"
relative_name:
description: Name of the dns recordset.
sample: servera

View file

@ -86,13 +86,13 @@ EXAMPLES = '''
- name: Create a DNS zone
azure_rm_dnszone:
resource_group: Testing
resource_group: myResourceGroup
name: example.com
state: present
- name: Delete a DNS zone
azure_rm_dnszone:
resource_group: Testing
resource_group: myResourceGroup
name: example.com
state: absent

View file

@ -46,12 +46,12 @@ author:
EXAMPLES = '''
- name: Get facts for one zone
azure_rm_dnszone_facts:
resource_group: Testing
resource_group: myResourceGroup
name: foobar22
- name: Get facts for all zones in a resource group
azure_rm_dnszone_facts:
resource_group: Testing
resource_group: myResourceGroup
- name: Get facts by tags
azure_rm_dnszone_facts:
@ -81,7 +81,7 @@ dnszones:
id:
description:
- id of the DNS Zone.
sample: "/subscriptions/XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Network/dnszones/azure.com"
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/dnszones/azure.com"
name:
description:
- name of the DNS Zone.
@ -93,11 +93,11 @@ dnszones:
registration_virtual_networks:
description:
- A list of references to virtual networks that register hostnames in this DNS zone.
sample: ["/subscriptions/XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/bar"]
sample: ["/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/bar"]
resolution_virtual_networks:
description:
- A list of references to virtual networks that resolve records in this DNS zone.
sample: ["/subscriptions/XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX/resourceGroups/foo/providers/Microsoft.Network/virtualNetworks/deadbeef"]
sample: ["/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/deadbeef"]
number_of_record_sets:
description:
- The current number of record sets in this DNS zone.