mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Azure Availability Set facts module (azure_rm_availabilityset_facts) (#28378)
* Adding facts module and Int. Tests * register results * Upgrading metadata version * Updating author handle To use Github handle
This commit is contained in:
parent
6d5b936cf4
commit
6b7e38555c
4 changed files with 211 additions and 0 deletions
|
@ -0,0 +1,3 @@
|
|||
cloud/azure
|
||||
posix/ci/cloud/azure
|
||||
destructive
|
|
@ -0,0 +1,2 @@
|
|||
dependencies:
|
||||
- setup_azure
|
|
@ -0,0 +1,29 @@
|
|||
- name: Create an availability set
|
||||
azure_rm_availabilityset:
|
||||
name: myavailabilityset1
|
||||
resource_group: "{{ resource_group }}"
|
||||
platform_update_domain_count: 5
|
||||
platform_fault_domain_count: 2
|
||||
sku: Classic
|
||||
tags:
|
||||
tag1: testtag
|
||||
|
||||
- name: Get facts for created availability set
|
||||
azure_rm_availabilityset_facts:
|
||||
name: myavailabilityset1
|
||||
resource_group: "{{ resource_group }}"
|
||||
register: results
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- not results.changed
|
||||
- not results.failed
|
||||
- results.ansible_facts.azure_availabilitysets[0].properties.platformFaultDomainCount == 2
|
||||
- results.ansible_facts.azure_availabilitysets[0].properties.platformUpdateDomainCount == 5
|
||||
- results.ansible_facts.azure_availabilitysets[0].sku == 'Classic'
|
||||
|
||||
- name: Delete the availability set
|
||||
azure_rm_availabilityset:
|
||||
name: myavailabilityset1
|
||||
resource_group: "{{ resource_group }}"
|
||||
state: absent
|
Loading…
Add table
Add a link
Reference in a new issue