Skip to content

Commit

Permalink
change code as codereview
Browse files Browse the repository at this point in the history
Signed-off-by: ZouYuhua <zouy@vmware.com>
  • Loading branch information
ZouYuhua committed Nov 14, 2023
1 parent f0c244f commit d144644
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
1 change: 0 additions & 1 deletion autoinstall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
22. For openSUSE Leap 15.3 or later unattend auto-install, please use file openSUSE/15/autoinst.xml.
23. For BCLinux 8.x unattend auto-install, please use file BCLinux/8/ks.cfg.
24. For BCLinux-for-Euler 21.10 unattend auto-install, please use file BCLinux-for-Euler/21.10/ks.cfg.
25. For Miracle Linux 8.x unattend auto-install, please use file RHEL/8/server_with_GUI/ks.cfg.

# Notes
## For Windows
Expand Down
19 changes: 19 additions & 0 deletions linux/check_os_fullname/miracle_fullname_map.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2023 VMware, Inc.
# SPDX-License-Identifier: BSD-2-Clause
---
# Guest id "asianux8_64Guest" and full name "MIRACLE LINUX 8 (64-bit)" is available on ESXi 6.7 or later
# When Miracle Linux 9.x is available, its expected guest id and guest full name is same as Miracle Linux 8.x on ESXi 8.x,
# as there is no Miracle Linux 9 (64-bit) selection in vSphere UI

- name: "Set fact of expected guest id on ESXi {{ esxi_version }}"
ansible.builtin.set_fact:
expected_guest_major_ver: "{{ [guest_os_ansible_distribution_major_ver | int, 8 ] | min }}"

- name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}"
ansible.builtin.set_fact:
expected_guest_id: "asianux{{ expected_guest_major_ver }}{{ expected_guest_id_suffix }}"
expected_guest_fullname: "MIRACLE LINUX {{ expected_guest_major_ver }} ({{ guest_os_bit }})"
when:
- vmtools_version is defined
- vmtools_version is version('12.3.5', '>')

8 changes: 1 addition & 7 deletions linux/check_os_fullname/set_guestinfo_without_shortname.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

- name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}"
include_tasks: "{{ guest_os_ansible_distribution | lower }}_fullname_map.yml"
when: guest_os_ansible_distribution in ["Amazon", "CentOS", "OracleLinux", "AlmaLinux", "Rocky", "Debian", "FreeBSD"]
when: guest_os_ansible_distribution in ["Amazon", "CentOS", "OracleLinux", "AlmaLinux", "Rocky", "Debian", "FreeBSD", "MIRACLE"]

- name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}"
ansible.builtin.set_fact:
Expand All @@ -64,12 +64,6 @@
expected_guest_fullname: "SUSE openSUSE ({{ guest_os_bit }})"
when: guest_os_ansible_distribution == "openSUSE Leap"

- name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}"
ansible.builtin.set_fact:
expected_guest_id: "asianux{{ guest_os_ansible_distribution_major_ver }}{{ expected_guest_id_suffix }}"
expected_guest_fullname: "MIRACLE LINUX {{ guest_os_ansible_distribution_major_ver }} ({{ guest_os_bit }})"
when: guest_os_ansible_distribution == "MIRACLE"

- name: "Set expected guest id and full name for {{ vm_guest_os_distribution }}"
include_tasks: otherlinux_fullname_map.yml
when: guest_is_otherlinux

0 comments on commit d144644

Please sign in to comment.