tests: workaround for terraform installation on RHEL-9

There is currently no hashicorp repository for RHEL-9 so fallback to
using RHEL-8 version instead.
This commit is contained in:
Jakub Rusz 2021-08-26 15:20:14 +02:00 committed by jrusz
parent 09a576ed07
commit 605a4ea80f

View file

@ -44,6 +44,11 @@ else
exit 1
fi
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/$release/hashicorp.repo
# set $releasever to 8 when running on RHEL-9 because there is no hashicorp repo for it yet
if [[ $ID == rhel || $ID == centos ]] && [[ ${VERSION_ID%.*} == 9 ]]; then
# shellcheck disable=SC2016
sudo sed -i 's/$releasever/8/g' /etc/yum.repos.d/hashicorp.repo
fi
sudo dnf install -y terraform
ARCH=$(uname -m)