Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vm_agent_version to output of azure_rm_virtualmachine_info #1289

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plugins/modules/azure_rm_virtualmachine_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@
returned: always
type: dict
sample: { "key1":"value1" }
vm_agent_version:
description:
- Version of the Azure VM Agent (waagent) running inside the VM.
returned: always
type: str
sample: '2.9.1.1'
vm_size:
description:
- Virtual machine size.
Expand Down Expand Up @@ -457,6 +463,11 @@ def serialize_vm(self, vm):

new_result = {}

if instance.get('vm_agent') is not None:
new_result['vm_agent_version'] = instance['vm_agent'].get('vm_agent_version')
else:
new_result['vm_agent_version'] = 'Unknown'

if vm.security_profile is not None:
new_result['security_profile'] = dict()
if vm.security_profile.encryption_at_host is not None:
Expand Down