Skip to content

Commit

Permalink
[Windows] Set expected guest fullname to OS fullname got from guest (#…
Browse files Browse the repository at this point in the history
…228)

* fix no mapping guest id issue

Signed-off-by: dianew <dianew@vmware.com>
  • Loading branch information
Tomorrow9 authored Jan 21, 2022
1 parent da242fb commit 1a4f43c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/vm_wait_log_msg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
# vm_wait_log_retries: how many times to re-check log about waiting message
# vm_wait_log_delay: seconds to delay for a retry
# vm_wait_log_ignore_errors: True to ignore task failure. Default is False.

# vm_wait_log_hide_output: True to hide the output, False will print the
# output of log content. Default is True.
#
- name: "Set fact of VM log file path in datastore"
set_fact:
vm_log_file_path: "{{ vm_dir_name }}/{{ vm_wait_log_name }}"
Expand All @@ -33,6 +35,7 @@
password: "{{ vsphere_host_user_password }}"
validate_certs: "{{ validate_certs | default(False) }}"
register: get_vm_log_content
no_log: "{{ vm_wait_log_hide_output | default(True) }}"
until:
- get_vm_log_content is defined
- get_vm_log_content.content is defined
Expand Down
4 changes: 4 additions & 0 deletions windows/check_os_fullname/check_os_fullname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
when: expected_guest_fullname == ""
when: guest_os_product_type != "client"

- name: Set expected guest fullname to OS fullname got in guest
set_fact:
expected_guest_fullname: "{{ (' ').join(os_fullname_guest.split()[:-1]) ~ ' (' ~ guest_os_ansible_architecture ~ ')' }}"
when: expected_guest_fullname == ""
- debug:
msg: "Expected guest fullname on ESXi '{{ esxi_version }}': {{ expected_guest_fullname }}"

Expand Down

0 comments on commit 1a4f43c

Please sign in to comment.