Created
June 30, 2024 13:34
-
-
Save jeffa/2dc7fa1933e5a0e99345dbfc08b46b21 to your computer and use it in GitHub Desktop.
Configures a provisioned VM with terraform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# prevent interactive prompts | |
sudo sed -i "/#\$nrconf{restart} = 'i';/s/.*/\$nrconf{restart} = 'a';/" \ | |
/etc/needrestart/needrestart.conf | |
cat /etc/needrestart/needrestart.conf | grep -i nrconf{restart} | |
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common | |
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null | |
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ | |
https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list | |
sudo apt update | |
sudo apt-get install terraform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment