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:
parent
09a576ed07
commit
605a4ea80f
1 changed files with 5 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue