From 67abe004ac8cec4e9434f29356e327d5b4d86803 Mon Sep 17 00:00:00 2001 From: Vignesh Goutham Ganesh Date: Wed, 6 Sep 2023 11:09:02 -0500 Subject: [PATCH] Add dracut cmd to generate initramfs with all drivers for rhel raw --- images/capi/ansible/roles/providers/tasks/raw.yml | 4 ++++ images/capi/packer/raw/raw-rhel-8.json | 1 + 2 files changed, 5 insertions(+) diff --git a/images/capi/ansible/roles/providers/tasks/raw.yml b/images/capi/ansible/roles/providers/tasks/raw.yml index d52a270efd..0a7211379c 100644 --- a/images/capi/ansible/roles/providers/tasks/raw.yml +++ b/images/capi/ansible/roles/providers/tasks/raw.yml @@ -35,6 +35,10 @@ - cloud-utils-growpart when: ansible_os_family == "RedHat" +- name: Run dracut cmd to regenerate initramfs with all drivers - needed when converting to different hypervisor templates + shell: dracut --force --no-hostonly + when: ansible_os_family == "RedHat" + #- name: Unlock password # replace: # path: /etc/cloud/cloud.cfg diff --git a/images/capi/packer/raw/raw-rhel-8.json b/images/capi/packer/raw/raw-rhel-8.json index 54a7c0d800..e1f1735c7a 100644 --- a/images/capi/packer/raw/raw-rhel-8.json +++ b/images/capi/packer/raw/raw-rhel-8.json @@ -2,6 +2,7 @@ "boot_command_prefix": " text inst.ks=", "boot_command_suffix": "/8/ks.cfg", "build_name": "rhel-8", + "build_target": "raw", "distro_name": "rhel", "distro_version": "8", "epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8",