Skip to content

Commit

Permalink
Add availability zones to azure_rm_virtualmachine_info module
Browse files Browse the repository at this point in the history
fixes #522
  • Loading branch information
ChandlerSwift committed May 12, 2021
1 parent b8e394d commit 1e2d23c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugins/modules/azure_rm_virtualmachine_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit 1e2d23c

Please sign in to comment.