redeploy steps in a shell script

This commit is contained in:
Vladan Popovic 2024-02-20 23:06:41 +01:00
parent e19d50c4fa
commit 2fee9ddf21

11
redeploy.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
set -xe
[[ -z $1 ]] && echo "must provide service path" && exit 1
pushd $1
podman run --interactive --rm -v $PWD:/data quay.io/coreos/butane --files-dir /data --pretty --strict < service.bu > service.ign
tofu state rm libvirt_volume.data 2>/dev/null || echo "data volume not provisioned ... continuing"
tofu destroy
tofu apply
popd