fix(cleanup): fix vmware CD-ROM omit fragility and add cross-role defaults
This commit is contained in:
@@ -12,19 +12,33 @@
|
||||
validate_certs: "{{ hypervisor_cfg.certs | bool }}"
|
||||
datacenter: "{{ hypervisor_cfg.datacenter }}"
|
||||
name: "{{ hostname }}"
|
||||
cdrom:
|
||||
- controller_number: 0
|
||||
unit_number: 0
|
||||
controller_type: sata
|
||||
type: iso
|
||||
iso_path: "{{ boot_iso }}"
|
||||
state: absent
|
||||
- controller_number: 0
|
||||
unit_number: 1
|
||||
controller_type: sata
|
||||
type: iso
|
||||
iso_path: "{{ rhel_iso if rhel_iso is defined and rhel_iso | length > 0 else omit }}"
|
||||
state: absent
|
||||
cdrom: >-
|
||||
{{
|
||||
[
|
||||
{
|
||||
'controller_number': 0,
|
||||
'unit_number': 0,
|
||||
'controller_type': 'sata',
|
||||
'type': 'iso',
|
||||
'iso_path': boot_iso,
|
||||
'state': 'absent'
|
||||
}
|
||||
]
|
||||
+ (
|
||||
[
|
||||
{
|
||||
'controller_number': 0,
|
||||
'unit_number': 1,
|
||||
'controller_type': 'sata',
|
||||
'type': 'iso',
|
||||
'iso_path': rhel_iso,
|
||||
'state': 'absent'
|
||||
}
|
||||
]
|
||||
if rhel_iso is defined and rhel_iso | length > 0
|
||||
else []
|
||||
)
|
||||
}}
|
||||
failed_when: false
|
||||
no_log: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user