Update azure_rm_manageddisk related document (#57206)

* Update azure_rm_manageddisk related documentation
This commit is contained in:
Fred-sun 2019-06-03 11:32:02 -04:00 committed by Alicia Cozine
parent 0f10c4e8d2
commit 2d5c9e06fa
2 changed files with 40 additions and 34 deletions

View file

@ -22,10 +22,10 @@ version_added: "2.4"
short_description: Manage Azure Manage Disks short_description: Manage Azure Manage Disks
description: description:
- Create, update and delete an Azure Managed Disk - Create, update and delete an Azure Managed Disk.
notes: notes:
- This module was called C(azure_rm_managed_disk) before Ansible 2.8. The usage did not change. - This module was called M(azure_rm_managed_disk) before Ansible 2.8. The usage did not change.
options: options:
resource_group: resource_group:
@ -48,13 +48,13 @@ options:
- Valid Azure location. Defaults to location of the resource group. - Valid Azure location. Defaults to location of the resource group.
storage_account_type: storage_account_type:
description: description:
- "Type of storage for the managed disk." - Type of storage for the managed disk.
- "If not specified, the disk is created as C(Standard_LRS)." - If not specified, the disk is created as C(Standard_LRS).
- "C(Standard_LRS) is for Standard HDD." - C(Standard_LRS) is for Standard HDD.
- "C(StandardSSD_LRS) (added in 2.8) is for Standard SSD." - C(StandardSSD_LRS) (added in 2.8) is for Standard SSD.
- "C(Premium_LRS) is for Premium SSD." - C(Premium_LRS) is for Premium SSD.
- "C(UltraSSD_LRS) (added in 2.8) is for Ultra SSD, which is in preview mode, and only available on select instance types." - C(UltraSSD_LRS) (added in 2.8) is for Ultra SSD, which is in preview mode, and only available on select instance types.
- "See https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types for more information about disk types." - See U(https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types) for more information about disk types.
choices: choices:
- Standard_LRS - Standard_LRS
- StandardSSD_LRS - StandardSSD_LRS
@ -62,8 +62,7 @@ options:
- UltraSSD_LRS - UltraSSD_LRS
create_option: create_option:
description: description:
- "Allowed values: empty, import, copy. - C(import) from a VHD file in I(source_uri) and C(copy) from previous managed disk I(source_uri).
- C(import) from a VHD file in I(source_uri) and C(copy) from previous managed disk I(source_uri)."
choices: choices:
- empty - empty
- import - import
@ -75,41 +74,41 @@ options:
- source_resource_uri - source_resource_uri
os_type: os_type:
description: description:
- "Type of Operating System: C(linux) or C(windows)." - Type of Operating System.
- "Used when I(create_option) is either C(copy) or C(import) and the source is an OS disk." - Used when I(create_option=copy) or I(create_option=import) and the source is an OS disk.
- "If omitted during creation, no value is set." - If omitted during creation, no value is set.
- "If omitted during an update, no change is made." - If omitted during an update, no change is made.
- "Once set, this value cannot be cleared." - Once set, this value cannot be cleared.
choices: choices:
- linux - linux
- windows - windows
disk_size_gb: disk_size_gb:
description: description:
- "Size in GB of the managed disk to be created." - Size in GB of the managed disk to be created.
- "If I(create_option) is C(copy) then the value must be greater than or equal to the source's size." - If I(create_option=copy) then the value must be greater than or equal to the source's size.
managed_by: managed_by:
description: description:
- Name of an existing virtual machine with which the disk is or will be associated, this VM should be in the same resource group. - Name of an existing virtual machine with which the disk is or will be associated, this VM should be in the same resource group.
- To detach a disk from a vm, explicitly set to ''. - To detach a disk from a vm, explicitly set to ''.
- If this option is unset, the value will not be changed. - If this option is unset, the value will not be changed.
version_added: 2.5 version_added: '2.5'
attach_caching: attach_caching:
description: description:
- "Disk caching policy controlled by VM. Will be used when attached to the VM defined by C(managed_by)." - Disk caching policy controlled by VM. Will be used when attached to the VM defined by C(managed_by).
- "If this option is different from the current caching policy, - If this option is different from the current caching policy, the managed disk will be deattached and attached with current caching option again.
the managed disk will be deattached from the VM and attached with current caching option again."
- "Allowed values: '', read_only, read_write."
choices: choices:
- '' - ''
- read_only - read_only
- read_write - read_write
version_added: 2.8 version_added: '2.8'
tags: tags:
description: description:
- Tags to assign to the managed disk. - Tags to assign to the managed disk.
- Format tags as 'key' or 'key:value'.
zone: zone:
description: description:
- "Allowed values: 1, 2, 3, ''." - The Azure managed disk's zone.
- Allowed values are C(1), C(2), C(3) and C(' ').
choices: choices:
- 1 - 1
- 2 - 2
@ -121,7 +120,7 @@ extends_documentation_fragment:
- azure - azure
- azure_tags - azure_tags
author: author:
- "Bruno Medina (@brusMX)" - Bruno Medina (@brusMX)
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -168,15 +167,18 @@ EXAMPLES = '''
RETURN = ''' RETURN = '''
id: id:
description: The managed disk resource ID. description:
- The managed disk resource ID.
returned: always returned: always
type: dict type: dict
state: state:
description: Current state of the managed disk description:
- Current state of the managed disk.
returned: always returned: always
type: dict type: dict
changed: changed:
description: Whether or not the resource has changed description:
- Whether or not the resource has changed.
returned: always returned: always
type: bool type: bool
''' '''

View file

@ -24,7 +24,7 @@ description:
- Get facts for a specific managed disk or all managed disks. - Get facts for a specific managed disk or all managed disks.
notes: notes:
- This module was called C(azure_rm_managed_disk_facts) before Ansible 2.8. The usage did not change. - This module was called M(azure_rm_managed_disk_facts) before Ansible 2.8. The usage did not change.
options: options:
name: name:
@ -66,7 +66,8 @@ EXAMPLES = r'''
RETURN = r''' RETURN = r'''
azure_managed_disk: azure_managed_disk:
description: List of managed disk dicts. description:
- List of managed disk dicts.
returned: always returned: always
type: list type: list
contains: contains:
@ -85,12 +86,12 @@ azure_managed_disk:
storage_account_type: storage_account_type:
description: description:
- Type of storage for the managed disk. - Type of storage for the managed disk.
- See https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types for more information about this type. - See U(https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-types) for more information about this type.
type: str type: str
sample: Standard_LRS sample: Standard_LRS
create_option: create_option:
description: description:
- Create option of the disk - Create option of the disk.
type: str type: str
sample: copy sample: copy
source_uri: source_uri:
@ -99,7 +100,10 @@ azure_managed_disk:
type: str type: str
os_type: os_type:
description: description:
- "Type of Operating System: C(linux) or C(windows)." - Type of Operating System.
choices:
- linux
- windows
type: str type: str
disk_size_gb: disk_size_gb:
description: description: