Skip to content

Commit

Permalink
support ansible testcase for Kylin Server 10
Browse files Browse the repository at this point in the history
Signed-off-by: ZouYuhua <[email protected]>
  • Loading branch information
ZouYuhua committed Jan 25, 2024
1 parent 9a21360 commit 535814a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ This project supports below scenarios for end-to-end guest operating system vali
| Red Hat Enterprise Linux CoreOS (RHCOS) 4.13 and later | | :heavy_check_mark: | :heavy_check_mark: |
| FusionOS 22 and 23 | :heavy_check_mark: | | :heavy_check_mark: |
| Miracle Linux 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: |
| Kylin Linux Advanced Server V10 and later | :heavy_check_mark: | | :heavy_check_mark: |

**Notes**
This compatible guest operating systems list is used for this project only. For guest operating system support status on ESXi, please refer to [VMware Compatibility Guide](https://www.vmware.com/resources/compatibility/search.php?deviceCategory=software&testConfig=16).
Expand Down
2 changes: 1 addition & 1 deletion autoinstall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
24. For BCLinux-for-Euler 21.10 unattend auto-install, please use file BCLinux-for-Euler/21.10/ks.cfg.
25. For FusionOS 22 unattend auto-install, please use files under Fusion.
26. For FusionOS 23 unattend auto-install, please use file Fusion/server_without_GUI/ks.cfg.
27. For Kylin Server V10 and later unattend auto-install, please use file Kylin/Server/10/ks.cfg.
27. For Kylin Linux Advanced Server V10 and later unattend auto-install, please use file Kylin/Server/10/ks.cfg.

# Notes
## For Windows
Expand Down
14 changes: 6 additions & 8 deletions common/get_guest_system_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@
guest_os_product_type: "{{ guest_system_info.ansible_os_product_type | default('') }}"
guest_os_hostname: "{{ guest_system_info.ansible_hostname | default('') }}"

- name: "Set fact of ansible_pkg_mgr manually when it'is unknown"
- name: "Update guest OS distribution facts for {{ guest_os_ansible_distribution }}"
ansible.builtin.set_fact:
guest_system_info: >-
{{
guest_system_info |
combine({'ansible_pkg_mgr': 'dnf'})
}}
guest_os_ansible_pkg_mgr: 'dnf'
guest_os_ansible_distribution_ver: "{{ guest_os_ansible_distribution_ver | regex_replace('V', '', ignorecase=True) }}"
guest_os_ansible_distribution_major_ver: "{{ guest_os_ansible_distribution_major_ver | regex_replace('V', '', ignorecase=True) | int }}"
when:
- guest_os_ansible_pkg_mgr == 'unknown' or guest_os_ansible_pkg_mgr == ''
- guest_os_ansible_distribution is match('Kylin.*')
- guest_os_ansible_distribution == "Kylin Linux Advanced Server"
- guest_os_ansible_distribution_major_ver | regex_replace('V', '', ignorecase=True) | int >= 10
- (not guest_os_ansible_pkg_mgr) or guest_os_ansible_pkg_mgr == 'unknown'
1 change: 1 addition & 0 deletions linux/utils/install_uninstall_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
name: "{{ package_manage_list }}"
allow_downgrade: true
state: "{{ package_state }}"
use_backend: "{% if guest_os_ansible_distribution == 'Kylin Linux Advanced Server' and guest_os_ansible_distribution_major_ver == 10 %}dnf4{% else %}auto{% endif %}"
delegate_to: "{{ vm_guest_ip }}"
when: guest_os_ansible_pkg_mgr | lower == "dnf"
when: guest_os_family == "RedHat"
Expand Down

0 comments on commit 535814a

Please sign in to comment.