Update azure_rm_virtualmachinescaleset related document (#58699)

This commit is contained in:
Fred-sun 2019-07-10 00:57:21 +08:00 committed by Alicia Cozine
parent 612223773a
commit de7776e25d
2 changed files with 61 additions and 58 deletions

View file

@ -19,13 +19,11 @@ module: azure_rm_virtualmachinescaleset
version_added: "2.4"
short_description: Manage Azure virtual machine scale sets.
short_description: Manage Azure virtual machine scale sets
description:
- Create and update a virtual machine scale set.
notes:
- This module was called C(azure_rm_virtualmachine_scaleset) before Ansible 2.8. The usage did not change.
- Note that this module was called M(azure_rm_virtualmachine_scaleset) before Ansible 2.8. The usage did not change.
options:
resource_group:
@ -41,7 +39,6 @@ options:
- Assert the state of the virtual machine scale set.
- State C(present) will check that the machine exists with the requested configuration. If the configuration
of the existing machine does not match, the machine will be updated.
state.
- State C(absent) will remove the virtual machine scale set.
default: present
choices:
@ -52,11 +49,11 @@ options:
- Valid Azure location. Defaults to location of the resource group.
short_hostname:
description:
- Short host name
- Short host name.
vm_size:
description:
- A valid Azure VM size value. For example, 'Standard_D4'. The list of choices varies depending on the
subscription and location. Check your subscription for available choices.
- A valid Azure VM size value. For example, C(Standard_D4).
- The list of choices varies depending on the subscription and location. Check your subscription for available choices.
capacity:
description:
- Capacity of VMSS.
@ -79,35 +76,29 @@ options:
- Admin username used to access the host after it is created. Required when creating a VM.
admin_password:
description:
- Password for the admin username. Not required if the os_type is Linux and SSH password authentication
is disabled by setting ssh_password_enabled to false.
- Password for the admin username.
- Not required if the os_type is Linux and SSH password authentication is disabled by setting I(ssh_password_enabled=false).
ssh_password_enabled:
description:
- When the os_type is Linux, setting ssh_password_enabled to false will disable SSH password authentication
and require use of SSH keys.
- When the os_type is Linux, setting I(ssh_password_enabled=false) will disable SSH password authentication and require use of SSH keys.
type: bool
default: true
ssh_public_keys:
description:
- "For os_type Linux provide a list of SSH keys. Each item in the list should be a dictionary where the
dictionary contains two keys: path and key_data. Set the path to the default location of the
authorized_keys files. On an Enterprise Linux host, for example, the path will be
/home/<admin username>/.ssh/authorized_keys. Set key_data to the actual value of the public key."
- For I(os_type=Linux) provide a list of SSH keys.
- Each item in the list should be a dictionary where the dictionary contains two keys, C(path) and C(key_data).
- Set the C(path) to the default location of the authorized_keys files.
- On an Enterprise Linux host, for example, the I(path=/home/<admin username>/.ssh/authorized_keys).
Set C(key_data) to the actual value of the public key.
image:
description:
- Specifies the image used to build the VM.
- If a string, the image is sourced from a custom image based on the
name.
- 'If a dict with the keys C(publisher), C(offer), C(sku), and
C(version), the image is sourced from a Marketplace image. NOTE:
set image.version to C(latest) to get the most recent version of a
given image.'
- 'If a dict with the keys C(name) and C(resource_group), the image
is sourced from a custom image based on the C(name) and
C(resource_group) set. NOTE: the key C(resource_group) is optional
and if omitted, all images in the subscription will be searched for
by C(name).'
- Custom image support was added in Ansible 2.5
- If a string, the image is sourced from a custom image based on the name.
- If a dict with the keys I(publisher), I(offer), I(sku), and I(version), the image is sourced from a Marketplace image.
Note that set I(version=latest) to get the most recent version of a given image.
- If a dict with the keys I(name) and I(resource_group), the image is sourced from a custom image based on the I(name) and I(resource_group) set.
Note that the key I(resource_group) is optional and if omitted, all images in the subscription will be searched for by I(name).
- Custom image support was added in Ansible 2.5.
required: true
os_disk_caching:
description:
@ -163,7 +154,8 @@ options:
virtual_network_resource_group:
description:
- When creating a virtual machine, if a specific virtual network from another resource group should be
used, use this parameter to specify the resource group to use.
used.
- Use this parameter to specify the resource group to use.
version_added: "2.5"
virtual_network_name:
description:
@ -185,8 +177,8 @@ options:
version_added: "2.8"
remove_on_absent:
description:
- When removing a VM using state 'absent', also remove associated resources.
- "It can be 'all' or a list with any of the following: ['network_interfaces', 'virtual_storage', 'public_ips']."
- When removing a VM using I(state=absent), also remove associated resources.
- It can be C(all) or a list with any of the following ['network_interfaces', 'virtual_storage', 'public_ips'].
- Any other input will be ignored.
default: ['all']
enable_accelerated_networking:
@ -198,8 +190,8 @@ options:
description:
- Existing security group with which to associate the subnet.
- It can be the security group name which is in the same resource group.
- It can be the resource Id.
- It can be a dict which contains C(name) and C(resource_group) of the security group.
- It can be the resource ID.
- It can be a dict which contains I(name) and I(resource_group) of the security group.
version_added: "2.7"
aliases:
- security_group_name
@ -222,9 +214,9 @@ options:
version_added: "2.8"
custom_data:
description:
- Data which is made available to the virtual machine and used by e.g., cloud-init.
- Many images in the marketplace are not cloud-init ready. Thus, data
sent to I(custom_data) would be ignored. If the image you are attempting to use is not listed in
- Data which is made available to the virtual machine and used by e.g., C(cloud-init).
- Many images in the marketplace are not cloud-init ready. Thus, data sent to I(custom_data) would be ignored.
- If the image you are attempting to use is not listed in
U(https://docs.microsoft.com/en-us/azure/virtual-machines/linux/using-cloud-init#cloud-init-overview),
follow these steps U(https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cloudinit-prepare-custom-image).
version_added: "2.8"
@ -234,7 +226,7 @@ extends_documentation_fragment:
- azure_tags
author:
- "Sertac Ozercan (@sozercan)"
- Sertac Ozercan (@sozercan)
'''
EXAMPLES = '''
@ -313,10 +305,12 @@ EXAMPLES = '''
RETURN = '''
azure_vmss:
description: Facts about the current state of the object. Note that facts are not part of the registered output but available directly.
description:
- Facts about the current state of the object.
- Note that facts are not part of the registered output but available directly.
returned: always
type: complex
contains: {
type: dict
sample: {
"properties": {
"overprovision": true,
"singlePlacementGroup": true,

View file

@ -20,26 +20,24 @@ version_added: "2.4"
short_description: Get Virtual Machine Scale Set facts
description:
- Get facts for a virtual machine scale set
notes:
- This module was called C(azure_rm_virtualmachine_scaleset_facts) before Ansible 2.8. The usage did not change.
- Get facts for a virtual machine scale set.
- Note that this module was called M(azure_rm_virtualmachine_scaleset_facts) before Ansible 2.8. The usage did not change.
options:
name:
description:
- Limit results to a specific virtual machine scale set
- Limit results to a specific virtual machine scale set.
resource_group:
description:
- The resource group to search for the desired virtual machine scale set
- The resource group to search for the desired virtual machine scale set.
tags:
description:
- List of tags to be matched
- List of tags to be matched.
format:
description:
- Format of the data returned.
- If C(raw) is selected information will be returned in raw format from Azure Python SDK.
- If C(curated) is selected the structure will be identical to input parameters of azure_rm_virtualmachinescaleset module.
- If C(curated) is selected the structure will be identical to input parameters of M(azure_rm_virtualmachinescaleset) module.
- In Ansible 2.5 and lower facts are always returned in raw format.
- Please note that this option will be deprecated in 2.10 when curated format will become the only supported format.
default: 'raw'
@ -52,7 +50,7 @@ extends_documentation_fragment:
- azure
author:
- "Sertac Ozercan (@sozercan)"
- Sertac Ozercan (@sozercan)
'''
EXAMPLES = '''
@ -75,13 +73,14 @@ EXAMPLES = '''
RETURN = '''
vmss:
description: List of virtual machine scale sets
description:
- List of virtual machine scale sets.
returned: always
type: complex
contains:
id:
description:
- Resource ID
- Resource ID.
returned: always
type: str
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/scalesets/myscaleset
@ -106,47 +105,55 @@ vmss:
caching:
description:
- Type of data disk caching.
returned: always
type: str
sample: ReadOnly
disk_size_gb:
description:
- The initial disk size in GB for blank data disks
- The initial disk size in GB for blank data disks.
returned: always
type: int
sample: 64
lun:
description:
- The logical unit number for data disk
- The logical unit number for data disk.
returned: always
type: int
sample: 0
managed_disk_type:
description:
- Managed data disk type
- Managed data disk type.
returned: always
type: str
sample: Standard_LRS
image:
description:
- Image specification
- Image specification.
returned: always
type: complex
contains:
offer:
description:
- Offer.
- The offer of the platform image or marketplace image used to create the virtual machine.
returned: always
type: str
sample: RHEL
publisher:
description:
- Publisher name.
returned: always
type: str
sample: RedHat
sku:
description:
- SKU name.
returned: always
type: str
sample: 7-RAW
version:
description:
- Image version.
returned: always
type: str
sample: 7.5.2018050901
load_balancer:
@ -163,7 +170,7 @@ vmss:
sample: japaneast
managed_disk_type:
description:
- Managed data disk type
- Managed data disk type.
type: str
returned: always
sample: Standard_LRS
@ -233,7 +240,9 @@ vmss:
returned: always
sample: Standard_D4
tags:
description: Tags assigned to the resource. Dictionary of string:string pairs.
description:
- Tags assigned to the resource. Dictionary of string:string pairs.
returned: always
type: dict
sample: { "tag1": "abc" }
''' # NOQA