Skip to content

Commit

Permalink
Fix empty hardware version in collected guest info
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <[email protected]>
  • Loading branch information
keirazhang committed Sep 1, 2023
1 parent 133c7de commit df3c935
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/vm_get_guest_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

- name: "Get guest info retrieved by VMware Tools"
ansible.builtin.set_fact:
guestinfo_hardware_version: "{{ vm_guestinfo.instance.guest.hwVersion }}"
guestinfo_guest_id: "{{ vm_guestinfo.instance.guest.guestId }}"
guestinfo_guest_full_name: "{{ vm_guestinfo.instance.guest.guestFullName }}"
guestinfo_guest_family: "{{ vm_guestinfo.instance.guest.guestFamily }}"
Expand Down
2 changes: 1 addition & 1 deletion plugin/ansible_vsphere_gosv_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def __init__(self, ansible_gosv_facts={}):
ansible_gosv_facts['esxi_update_version'] != 'N/A'):
self.ESXi_Version += ' U' + ansible_gosv_facts['esxi_update_version']
self.ESXi_Build = ansible_gosv_facts.get('esxi_build', '')
self.Hardware_Version = ansible_gosv_facts.get('vm_hardware_version','')
self.Hardware_Version = ansible_gosv_facts.get('guestinfo_hardware_version','')
self.VMTools_Version = ansible_gosv_facts.get('guestinfo_vmtools_info', '')
self.Config_Guest_Id = ansible_gosv_facts.get('vm_guest_id', '')
self.GuestInfo_Guest_Id = ansible_gosv_facts.get('guestinfo_guest_id', '')
Expand Down

0 comments on commit df3c935

Please sign in to comment.