Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update azure_rm_availabilityset related module document #56432

Merged
merged 11 commits into from May 20, 2019
60 changes: 51 additions & 9 deletions lib/ansible/modules/cloud/azure/azure_rm_availabilityset.py
Expand Up @@ -18,11 +18,12 @@

version_added: "2.4"

short_description: Manage Azure availability set.
short_description: Manage Azure Availability Set

description:
- Create, update and delete Azure availability set. An availability set cannot be updated, you will have to
recreate one instead. The only update operation will be for the tags.
- Create, update and delete Azure Availability Set.
- An availability set cannot be updated, you will have to recreate one instead.
- The only update operation will be for the tags.

options:
resource_group:
Expand All @@ -35,22 +36,25 @@
required: true
state:
description:
- Assert the state of the availability set. Use C(present) to create or update a availability set and
C(absent) to delete a availability set.
- Assert the state of the availability set.
- Use C(present) to create or update a availability set and C(absent) to delete a availability set.
default: present
choices:
- absent
- present
location:
description:
- Valid azure location. Defaults to location of the resource group.
- Valid Azure location. Defaults to location of the resource group.
platform_update_domain_count:
description:
- Update domains indicate groups of virtual machines and underlying physical hardware that can be rebooted at the same time. Default is 5.
- Update domains indicate groups of virtual machines and underlying physical hardware that can be rebooted at the same time.
type: int
default: 5
Fred-sun marked this conversation as resolved.
Show resolved Hide resolved
platform_fault_domain_count:
description:
- Fault domains define the group of virtual machines that share a common power source and network switch. Should be between 1 and 3. Default is 3
- Fault domains define the group of virtual machines that share a common power source and network switch.
- Should be between C(1) and C(3).
type: int
default: 3
sku:
description:
Expand Down Expand Up @@ -93,13 +97,51 @@

RETURN = '''
state:
description: Current state of the availability set
description: Current state of the availability set.
returned: always
type: dict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fill the contains, the options are mentioned in

def availability_set_to_dict(avaset):

contains:
id:
description:
- Resource ID.
type: str
sample: "/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/v-xisuRG/providers/Microsoft.Compute/availabilitySets/myavailabilityset2"
location:
description:
- Location where the resource lives.
type: str
sample: eastus
name:
description:
- Resource name.
type: str
sample: myavailabilityset2
platform_fault_domain_count:
description:
- Fault domains values.
type: int
sample: 2
platform_update_domain_count:
description:
- Update domains values.
type: int
sample: 5
sku:
description:
- The availability set supports managed disks.
type: str
sample: Aligned
tags:
description:
- Resource tags.
type: dict
sample: {env: sandbox}

changed:
description: Whether or not the resource has changed
returned: always
type: bool
sample: true
'''

from ansible.module_utils.azure_rm_common import AzureRMModuleBase
Expand Down
Expand Up @@ -17,21 +17,21 @@

version_added: "2.4"

short_description: Get availability set facts.
Fred-sun marked this conversation as resolved.
Show resolved Hide resolved
short_description: Get Azure Availability Set facts

description:
- Get facts for a specific availability set or all availability sets.

options:
name:
description:
- Limit results to a specific availability set
- Limit results to a specific availability set.
resource_group:
description:
- The resource group to search for the desired availability set
- The resource group to search for the desired availability set.
tags:
description:
- List of tags to be matched
- List of tags to be matched.

extends_documentation_fragment:
- azure
Expand Down