From 9525163f10018769bd151739d5ccbb02ecf9725a Mon Sep 17 00:00:00 2001 From: "elston.lewis" Date: Fri, 26 Jan 2024 10:56:36 +0100 Subject: [PATCH] Added RHEL8 script --- scripts/base/rhel8.sh | 9 +++++++++ scripts/linux/rhel-activation.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 scripts/base/rhel8.sh diff --git a/scripts/base/rhel8.sh b/scripts/base/rhel8.sh new file mode 100644 index 0000000..097b7b5 --- /dev/null +++ b/scripts/base/rhel8.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -e + +#### BASIC IMAGE +yum install -y wget qemu-img libgcrypt +cd /tmp +wget -q https://oos.eu-west-2.outscale.com/omi/qcow/rhel-8.4-x86_64-kvm.qcow2 +mv *.qcow2 rhel8.qcow2 +qemu-img convert ./rhel8.qcow2 -O raw /dev/sda diff --git a/scripts/linux/rhel-activation.sh b/scripts/linux/rhel-activation.sh index 387b07f..6f0bb83 100644 --- a/scripts/linux/rhel-activation.sh +++ b/scripts/linux/rhel-activation.sh @@ -6,7 +6,7 @@ if [[ "$1" == "rhel"*"csp" ]]; then curl -k --output /mnt/tmp/katello-ca-consumer-latest.noarch.rpm https://169.254.169.254:4888/pub/katello-ca-consumer-latest.noarch.rpm chroot /mnt yum localinstall -y /tmp/katello-ca-consumer-latest.noarch.rpm - if [[ "$1" == "rhel9csp" ]]; then + if [[ "$1" == "rhel8csp" ]] && [[ "$1" == "rhel9csp" ]]; then cp /tmp/cloudinit-specific/05_rhel9.cfg /mnt/etc/cloud/cloud.cfg.d/ fi fi