Clean up libvirt network

Clean up libvirt network once the script has
finished successfully.
This commit is contained in:
Miguel Martín 2023-11-20 16:13:58 +01:00 committed by Miguel Martin
parent 53955af7ca
commit 38f9687cc1
9 changed files with 33 additions and 0 deletions

View file

@ -225,6 +225,10 @@ wait_for_ssh_up () {
clean_up () {
greenprint "🧼 Cleaning up"
# Clear integration network
sudo virsh net-destroy integration
sudo virsh net-undefine integration
# Remove any status containers if exist
sudo podman ps -a -q --format "{{.ID}}" | sudo xargs --no-run-if-empty podman rm -f
# Remove all images