Initial commit

This commit is contained in:
Pijus Kamandulis
2022-01-28 18:02:57 +02:00
commit ea46b13a17
14 changed files with 738 additions and 0 deletions

31
setup_environment.sh Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
# Install packages
sudo apt -y install wget unzip python3 python3-venv
# Download terraform
if [ -d "./bin" ]
then
echo "Found bin directory."
else
wget https://releases.hashicorp.com/terraform/1.1.3/terraform_1.1.3_linux_amd64.zip
unzip terraform_1.1.3_linux_amd64.zip -d ./bin
rm terraform_1.1.3_linux_amd64.zip
fi
# Initialize terraform
bin/terraform -chdir=terraform_pl init
# Create ansible venv for python
VENV_NAME="./venv"
if [ -d "$VENV_NAME" ]
then
echo "Found venv directory."
else
echo "Creating venv..."
python3 -m venv "$VENV_NAME"
source "$VENV_NAME/bin/activate"
pip3 install ansible
deactivate
fi