code-server-terraform update/add workflows

This commit is contained in:
aptalca
2023-05-17 16:39:01 -04:00
parent fcb92cb4ae
commit 487fdd1d03
8 changed files with 62 additions and 75 deletions
-9
View File
@@ -1,9 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
source /etc/lsb-release
[[ ! -f "/etc/apt/sources.list.d/hashicorp.list" ]] &&
curl -s https://apt.releases.hashicorp.com/gpg | apt-key add - &&
echo "deb https://apt.releases.hashicorp.com ${DISTRIB_CODENAME} main" \
>/etc/apt/sources.list.d/hashicorp.list
-3
View File
@@ -1,3 +0,0 @@
#!/usr/bin/with-contenv bash
apt-get update
-8
View File
@@ -1,8 +0,0 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
echo "**** Installing Terraform"
apt-get install -y \
terraform
install-extension hashicorp.terraform
@@ -1,14 +1,10 @@
#!/usr/bin/with-contenv bash
if ! dpkg -l | grep gnupg > /dev/null; then
apt-get update && apt-get install -y gnupg
fi
if [ ! -f "/etc/apt/sources.list.d/hashicorp.list" ]; then
echo "**** Adding terraform packages to install list ****"
curl -s https://apt.releases.hashicorp.com/gpg | apt-key add -
curl -fsSL https://apt.releases.hashicorp.com/gpg | tee /usr/share/keyrings/hashicorp.gpg >/dev/null
source /etc/lsb-release
echo "deb https://apt.releases.hashicorp.com ${DISTRIB_CODENAME} main" > /etc/apt/sources.list.d/hashicorp.list
echo "deb [signed-by=/usr/share/keyrings/hashicorp.gpg] https://apt.releases.hashicorp.com ${DISTRIB_CODENAME} main" > /etc/apt/sources.list.d/hashicorp.list
echo "terraform" >> /mod-repo-packages-to-install.list
else
echo "**** Terraform packages already installed, skipping ****"