Skip to content

Commit

Permalink
Update Flatcar checking
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Zhang <qiz@vmware.com>
  • Loading branch information
keirazhang committed Jun 26, 2023
1 parent 6371521 commit 443e40d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
14 changes: 9 additions & 5 deletions linux/guest_customization/check_gosc_support_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,19 @@

- name: "Set default guest OS list not support GOSC"
ansible.builtin.set_fact:
gos_not_support_gosc: ["FreeBSD", "SLED", "Astra Linux (Orel)", "Fedora", "openSUSE Leap", "RHCOS"]
gos_not_support_gosc:
- "Flatcar"
- "SLED"
- "FreeBSD"
- "Astra Linux (Orel)"
- "Fedora"
- "openSUSE Leap"
- "RHCOS"

- name: "Set fact of GOSC support status to False for {{ guest_os_ansible_distribution }}"
ansible.builtin.set_fact:
gosc_is_supported: false
when: >
(guest_os_ansible_distribution in gos_not_support_gosc) or
('Flatcar' in guest_os_ansible_distribution)
when: guest_os_ansible_distribution in gos_not_support_gosc

- name: "Set cloud-init GOSC support status for {{ vm_guest_os_distribution }}"
block:
Expand Down Expand Up @@ -126,7 +131,6 @@
when:
- not enable_cloudinit_gosc | bool
- guest_os_ansible_distribution not in gos_not_support_gosc
- "'Flatcar' not in guest_os_ansible_distribution"

- name: "Display GOSC support status for {{ vm_guest_os_distribution }}"
ansible.builtin.debug:
Expand Down
4 changes: 1 addition & 3 deletions linux/network_device_ops/check_pvrdma_support_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
vars:
skip_msg: "{{ guest_os_ansible_distribution }} doesn't support PVRDMA"
skip_reason: "Not Supported"
when: >
('Flatcar' in guest_os_ansible_distribution or
guest_os_ansible_distribution in ['Fedora', 'VMware Photon OS', 'RHCOS'])
when: guest_os_ansible_distribution in ['Fedora', 'VMware Photon OS', 'Flatcar', 'RHCOS']

- name: "Get guest config options"
include_tasks: ../../common/esxi_get_guest_config_options.yml
Expand Down
4 changes: 2 additions & 2 deletions linux/nvdimm_cold_add_remove/nvdimm_cold_add_remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
doesn't support NVDIMM.
skip_reason: "Not Supported"
when: >
('Flatcar' in guest_os_ansible_distribution or
guest_os_ansible_distribution in ['UnionTech', 'Uos', 'Amazon', 'openSUSE Leap', 'RHCOS'] or
(guest_os_ansible_distribution in ['Flatcar', 'UnionTech', 'Uos',
'Amazon', 'openSUSE Leap', 'RHCOS'] or
(guest_os_ansible_distribution == 'Ubuntu' and
guest_os_edition == 'CloudImage'))
Expand Down
2 changes: 1 addition & 1 deletion linux/open_vm_tools/ovt_verify_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
vars:
skip_msg: "Skip test case because {{ guest_os_ansible_distribution }} doesn't support installing open-vm-tools"
skip_reason: "Not Supported"
when: ('Flatcar' in guest_os_ansible_distribution or guest_os_ansible_distribution == 'RHCOS')
when: guest_os_ansible_distribution in ['Flatcar', 'RHCOS']

# VM has open-vm-tools installed and update_vmtools is set false
- include_tasks: ../../common/skip_test_case.yml
Expand Down
2 changes: 1 addition & 1 deletion linux/open_vm_tools/ovt_verify_uninstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
vars:
skip_msg: "Skip test case because {{ guest_os_ansible_distribution }} doesn't support uninstalling open-vm-tools"
skip_reason: "Not Supported"
when: ('Flatcar' in guest_os_ansible_distribution or guest_os_ansible_distribution == 'RHCOS')
when: guest_os_ansible_distribution in ['Flatcar', 'RHCOS']

- name: "Block test case when guest OS doesn't install open-vm-tools"
include_tasks: ../../common/skip_test_case.yml
Expand Down
8 changes: 3 additions & 5 deletions linux/vhba_hot_add_remove/wait_device_list_changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@
- rescan_scsi_result is defined
- rescan_scsi_result.stdout_lines
when:
- "'Flatcar' not in guest_os_ansible_distribution"
- not (guest_os_ansible_distribution == "Ubuntu" and
guest_os_ansible_distribution_major_ver | int >= 22)
- not (guest_os_ansible_distribution == "Debian" and
guest_os_ansible_distribution_major_ver | int >= 12)
- guest_os_ansible_distribution not in ["Fedora", "RHCOS"]
- guest_os_ansible_distribution not in ["Flatcar", "Fedora", "RHCOS"]

- name: "Rescan scsi devices in {{ guest_os_ansible_distribution }} {{ guest_os_ansible_distribution_ver }}"
block:
Expand Down Expand Up @@ -83,12 +82,11 @@
- guest_ansible_device[wait_device_name].size == "0.00 Bytes"
when: wait_device_state | lower == 'absent'
when: >
('Flatcar' in guest_os_ansible_distribution or
(guest_os_ansible_distribution == "Ubuntu" and
((guest_os_ansible_distribution == "Ubuntu" and
guest_os_ansible_distribution_major_ver | int >= 22) or
(guest_os_ansible_distribution == "Debian" and
guest_os_ansible_distribution_major_ver | int >= 12) or
guest_os_ansible_distribution in ["Fedora", "RHCOS"])
guest_os_ansible_distribution in ["Flatcar", "Fedora", "RHCOS"])
when: new_disk_ctrl_type == 'lsilogic'

- name: "Handle NVMe disk"
Expand Down

0 comments on commit 443e40d

Please sign in to comment.