mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
927 B
YAML
30 lines
927 B
YAML
7 years ago
|
- 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
|