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