From 76ed1e8803be8c5ffd01d761b30617fe16561b5b Mon Sep 17 00:00:00 2001 From: "elston.lewis" Date: Mon, 29 Jan 2024 11:29:52 +0100 Subject: [PATCH] Updated rhel8 subscription sctipt --- files/cloudinit-specific/05_rhel8.cfg | 6 ++++++ scripts/linux/rhel-activation.sh | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 files/cloudinit-specific/05_rhel8.cfg diff --git a/files/cloudinit-specific/05_rhel8.cfg b/files/cloudinit-specific/05_rhel8.cfg new file mode 100644 index 0000000..8af5ad9 --- /dev/null +++ b/files/cloudinit-specific/05_rhel8.cfg @@ -0,0 +1,6 @@ +rh_subscription: + activation-key: outscale-rhel8 + org: Outscale + auto-attach: true + rhsm-baseurl: 'https://rhsatellite.outscale.internal:4888/pulp/repos' + server-hostname: 'rhsatellite.outscale.internal:4888' diff --git a/scripts/linux/rhel-activation.sh b/scripts/linux/rhel-activation.sh index 6f0bb83..715e283 100644 --- a/scripts/linux/rhel-activation.sh +++ b/scripts/linux/rhel-activation.sh @@ -6,7 +6,11 @@ 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" == "rhel8csp" ]] && [[ "$1" == "rhel9csp" ]]; then + if [[ "$1" == "rhel8csp" ]]; then + cp /tmp/cloudinit-specific/05_rhel8.cfg /mnt/etc/cloud/cloud.cfg.d/ + fi + + if [[ "$1" == "rhel9csp" ]]; then cp /tmp/cloudinit-specific/05_rhel9.cfg /mnt/etc/cloud/cloud.cfg.d/ fi fi