mirror of
https://github.com/kasmtech/workspaces-images.git
synced 2025-08-17 00:51:09 +02:00
Merge branch 'bugfix/KASM-7408-fix_terraform_installation_develop' into 'develop'
exclude fedora38,39 for terraform installation Closes KASM-7408 See merge request kasm-technologies/internal/workspaces-images!286
This commit is contained in:
@ -1,17 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g')
|
ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g')
|
||||||
|
|
||||||
if [ "${ARCH}" == "arm64" ] ; then
|
if [ "${ARCH}" == "arm64" ] ; then
|
||||||
echo "Terraform for arm64 currently not supported, skipping install"
|
echo "Terraform for arm64 currently not supported, skipping install"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|rhel9|almalinux9|almalinux8) ]]; then
|
if [[ "${DISTRO}" == @(oracle8|rockylinux9|rockylinux8|oracle9|rhel9|almalinux9|almalinux8) ]]; then
|
||||||
dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
|
dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
|
||||||
dnf install -y terraform
|
dnf install -y terraform
|
||||||
if [ -z ${SKIP_CLEAN+x} ]; then
|
if [ -z ${SKIP_CLEAN+x} ]; then
|
||||||
dnf clean all
|
dnf clean all
|
||||||
fi
|
fi
|
||||||
elif [[ "${DISTRO}" == @(fedora39|fedora40) ]]; then
|
elif [[ "${DISTRO}" == @(fedora40) ]]; then
|
||||||
dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
|
dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
|
||||||
# use fedora40 hashicorp packages for terraform
|
# use fedora40 hashicorp packages for terraform
|
||||||
sed -i 's/$releasever/40/g' /etc/yum.repos.d/hashicorp.repo
|
sed -i 's/$releasever/40/g' /etc/yum.repos.d/hashicorp.repo
|
||||||
@ -19,6 +22,9 @@ elif [[ "${DISTRO}" == @(fedora39|fedora40) ]]; then
|
|||||||
if [ -z ${SKIP_CLEAN+x} ]; then
|
if [ -z ${SKIP_CLEAN+x} ]; then
|
||||||
dnf clean all
|
dnf clean all
|
||||||
fi
|
fi
|
||||||
|
elif [[ "${DISTRO}" == @(fedora38|fedora39) ]]; then
|
||||||
|
# skip installation for fedora38 and fedora39
|
||||||
|
echo "Skipping terraform install for ${DISTRO}, as it is not officially supported by HashiCorp."
|
||||||
else
|
else
|
||||||
yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
|
yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
|
||||||
yum install -y terraform
|
yum install -y terraform
|
||||||
|
Reference in New Issue
Block a user