Add RHEL8 and RHEL9 support

This commit is contained in:
2024-10-30 00:29:46 +01:00
parent f8ba5c41db
commit 147430b36e
16 changed files with 176 additions and 60 deletions

View File

@@ -15,7 +15,7 @@
state: absent
loop:
- ide0
- ide1
- ide2
- name: Remove CD-ROM from VM in vCenter
when: hypervisor == "vmware"
@@ -30,7 +30,7 @@
name: "{{ hostname }}"
cdrom:
- controller_number: 0
unit_number: 0
unit_number: 1
controller_type: sata
type: iso
iso_path: "{{ boot_iso }}"
@@ -63,7 +63,7 @@
- name: Remove CD-ROM devices
when: cdrom_devices.stdout_lines | length > 0
ansible.builtin.command: virsh --connect qemu:///system detach-disk {{ hostname }} {{ item }} --persistent
with_items: "{{ cdrom_devices.stdout_lines }}"
with_items: "{{ cdrom_devices.stdout_lines | select('ne', 'sdc') | list }}"
changed_when: result.rc == 0
register: result