adding terraform to sarpdate

This commit is contained in:
Andy Pack 2023-03-04 23:21:41 +00:00
parent 2b1a316575
commit b6f2c5b33f
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7

View File

@ -1,33 +1,44 @@
#!/usr/bin/env bash #!/usr/bin/env bash
echo ">> updating everything....." echo ">> updating everything....."
echo
echo
echo ">> updating local brew dependencies...." echo ">> updating local brew dependencies...."
echo
brew update brew update
echo
echo
echo ">> which leaves these outdated...." echo ">> which leaves these outdated...."
echo
brew outdated brew outdated
echo echo
read -p ">> upgrade? (y/n) " updatebrew read -p ">> upgrade? (y/n) " updatebrew
if [ updatebrew = "y" ]; then if [ $updatebrew == "y" ]; then
echo ">> upgrading......" echo ">> upgrading......"
brew upgrade brew upgrade
fi fi
echo echo
echo echo ">> checking terraform diff...."
echo ">> updating ansible environment...." cd ~/dev/infra/terraform
cd ~/dev/infra/ansible terraform plan
poetry update
echo echo
read -p ">> apply terraform changes? (y/n) " updateterraform
if [ $updateterraform == "y" ]; then
echo ">> applying......"
terraform apply -auto-approve
fi
echo
read -p ">> update ansible environment? (y/n) " updateansible
if [ $updateansible == "y" ]; then
echo ">> upgrading......"
cd ~/dev/infra/ansible
poetry update
fi
echo echo
echo ">> running a few playbooks...." echo ">> running a few playbooks...."
echo echo
cd ~/dev/infra/ansible
./update ./update