From 6202743ea41693b58ab81e7010074d132fcb67e8 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Wed, 8 Feb 2023 05:44:18 +0000 Subject: [PATCH] Check unmapped guest full name when guest id is empty Signed-off-by: Qi Zhang --- linux/check_os_fullname/validate_os_fullname.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/linux/check_os_fullname/validate_os_fullname.yml b/linux/check_os_fullname/validate_os_fullname.yml index a708916a9..858c467c7 100644 --- a/linux/check_os_fullname/validate_os_fullname.yml +++ b/linux/check_os_fullname/validate_os_fullname.yml @@ -21,7 +21,7 @@ # If the guest os full name is unmapped and displays OS detailed data on ESXi 6.7 GA and Update 1, # or on ESXi 7.0.0, that's expected. Test passed. -- name: "Check unmapped guest OS full name" +- name: "Check unmapped guest OS full name on ESXi {{ esxi_version }} when guest id is empty" block: # The unmapped guest full name which at least includes Linux kernel version, OS pretty name # For VM with newer VMware Tools, the unmapped guest full name also includes OS name, version id and build id @@ -45,9 +45,11 @@ when: - unmapped_guest_fullname is defined and unmapped_guest_fullname - unmapped_guest_fullname in guestinfo_guest_full_name - when: > - (esxi_version is version('6.7.0', '==') and esxi_update_version | int < 2) or - esxi_version is version('7.0.0', '==') + when: + - not guestinfo_guest_id + - ((esxi_version is version('6.7.0', '==') and + esxi_update_version | int < 2) or + esxi_version is version('7.0.0', '==')) - name: "Check guest id in VM's guest info with VMware Tools {{ vmtools_version }} on ESXi {{ esxi_version }}" ansible.builtin.assert: