mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
azure virtual machine facts -- querying all machines in subscription fix (#54075)
This commit is contained in:
@@ -332,7 +332,8 @@
|
||||
publisher: Canonical
|
||||
sku: 16.04-LTS
|
||||
version: latest
|
||||
|
||||
tags:
|
||||
abc: def
|
||||
- assert:
|
||||
that:
|
||||
- azure_vm.properties.availabilitySet.id
|
||||
@@ -344,10 +345,6 @@
|
||||
name: "{{ vm_name2 }}"
|
||||
register: results
|
||||
|
||||
- name: Just dump output
|
||||
debug:
|
||||
var: results
|
||||
|
||||
- name: Assert that facts module returned the second vm
|
||||
assert:
|
||||
that:
|
||||
@@ -358,6 +355,17 @@
|
||||
- results.vms[0].resource_group == "{{ resource_group }}"
|
||||
- results.vms[0].power_state != None
|
||||
|
||||
- name: Retrieve facts by tags
|
||||
azure_rm_virtualmachine_facts:
|
||||
tags:
|
||||
- abc:def
|
||||
register: results
|
||||
|
||||
- name: Assert that facts module returned the second vm
|
||||
assert:
|
||||
that:
|
||||
- results.vms | length >= 1
|
||||
|
||||
- name: Should be idempotent with a dual NICs
|
||||
azure_rm_virtualmachine:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
||||
Reference in New Issue
Block a user