feat(cleanup): gate RHEL ISO disk and fstab handling on rhel_repo.source
This commit is contained in:
@@ -23,8 +23,19 @@
|
||||
regexp: "(xfs.*?)(attr2)"
|
||||
replace: "\\1allocsize=64m"
|
||||
|
||||
- name: Remove RHEL ISO fstab entry when not using local repo
|
||||
when:
|
||||
- os == "rhel"
|
||||
- system_cfg.features.rhel_repo.source != "iso"
|
||||
ansible.builtin.lineinfile:
|
||||
path: /mnt/etc/fstab
|
||||
regexp: "^.*\\/dvd.*$"
|
||||
state: absent
|
||||
|
||||
- name: Replace ISO UUID entry with /dev/sr0 in fstab
|
||||
when: os == "rhel"
|
||||
when:
|
||||
- os == "rhel"
|
||||
- system_cfg.features.rhel_repo.source == "iso"
|
||||
vars:
|
||||
configuration_fstab_dvd_line: >-
|
||||
{{
|
||||
@@ -39,7 +50,10 @@
|
||||
state: present
|
||||
|
||||
- name: Write image from RHEL ISO to the target machine
|
||||
when: os == "rhel" and hypervisor_type == 'vmware'
|
||||
when:
|
||||
- os == "rhel"
|
||||
- hypervisor_type == "vmware"
|
||||
- system_cfg.features.rhel_repo.source == "iso"
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- dd
|
||||
|
||||
Reference in New Issue
Block a user