Skip to content

Commit

Permalink
Fix empty CloudInit Version and GUI Installed in results.log (#417)
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <qiz@vmware.com>
  • Loading branch information
keirazhang authored Jan 18, 2023
1 parent 96a671f commit 74f82c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions plugin/ansible_vsphere_gosv_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,9 @@ def v2_runner_on_ok(self, result):
self.vm_info.GuestInfo_Detailed_Data = set_fact_result.get("guestinfo_detailed_data", '')
self.vm_info.VMTools_Version = set_fact_result.get("guestinfo_vmtools_info", '')
if "check_guest_os_gui.yml" == task_file:
if self.vm_info:
self.vm_info.GUI_Installed = str(set_fact_result.get("guest_os_with_gui", ''))
guest_os_with_gui = str(set_fact_result.get("guest_os_with_gui", ''))
if self.vm_info and guest_os_with_gui != '':
self.vm_info.GUI_Installed = guest_os_with_gui

elif str(task.action) == "ansible.builtin.debug":
if "skip_test_case.yml" == task_file and "Skip testcase:" in task.name:
Expand Down Expand Up @@ -837,7 +838,7 @@ def v2_runner_on_ok(self, result):
self.vcenter_info['version'] = debug_var_value
if not self.vcenter_info['build'] and debug_var_name == "vcenter_build":
self.vcenter_info['build'] = debug_var_value
if "cloudinit_pkg_check.yml" == task_file and debug_var_name == "cloudinit_version":
if "get_cloudinit_version.yml" == task_file and debug_var_name == "cloudinit_version":
if self.vm_info and not self.vm_info.CloudInit_Version:
self.vm_info.CloudInit_Version = debug_var_value
if not self.os_cloudinit_version:
Expand Down

0 comments on commit 74f82c7

Please sign in to comment.