File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
windows/check_os_fullname Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3838 ansible.builtin.set_fact :
3939 current_gos : " {{ guest_os_ansible_distribution.strip('Microsoft ') }}"
4040
41- - name : " Get the current OS info in the pre-defined guest OS info list"
41+ - name : " Get OS info in the pre-defined guest OS info list matched current OS "
4242 ansible.builtin.set_fact :
4343 current_gos_info : " {{ win_gos_info | selectattr('win_guest', 'equalto', current_gos) }}"
4444
4545 - name : " Check current OS in the pre-defined guest OS info list"
4646 ansible.builtin.assert :
4747 that :
48- - current_gos_info
48+ - current_gos_info | length == 1
4949 fail_msg : >
5050 "The pre-defined guest OS info list does not contain this OS version: {{ current_gos }},
5151 please check whether this guest OS is supported and add it to the list accordingly."
5252
53+ - name : " Set fact of the matched current OS info"
54+ ansible.builtin.set_fact :
55+ current_gos_info : " {{ current_gos_info[0] }}"
56+
5357 - name : " Handle Windows 11 known issue"
5458 include_tasks : win11_guest_info_exception.yml
5559
You can’t perform that action at this time.
0 commit comments