From 63185e19a5f3b4e9887e314397ccfd6906b6505f Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Tue, 4 May 2021 12:42:14 -0500 Subject: [PATCH] Add availability zones to azure_rm_virtualmachine_info module fixes #522 --- plugins/modules/azure_rm_virtualmachine_info.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/modules/azure_rm_virtualmachine_info.py b/plugins/modules/azure_rm_virtualmachine_info.py index a3f7578b8d..202e4bd3d2 100644 --- a/plugins/modules/azure_rm_virtualmachine_info.py +++ b/plugins/modules/azure_rm_virtualmachine_info.py @@ -234,6 +234,10 @@ returned: always type: str sample: Standard_D4 + zones: + description: + - A list of Availability Zones for your VM. + type: list power_state: description: - Power state of the virtual machine. @@ -386,6 +390,7 @@ def serialize_vm(self, vm): new_result['state'] = 'present' new_result['location'] = vm.location new_result['vm_size'] = result['properties']['hardwareProfile']['vmSize'] + new_result['zones'] = result['zones'] os_profile = result['properties'].get('osProfile') if os_profile is not None: new_result['admin_username'] = os_profile.get('adminUsername')