clean.sh 619 Bytes
Newer Older
1 2 3 4 5 6 7
#!/usr/bin/env bash

#Clean script to uninstall provisioning server for Foreman/QuickStack
#author: Dan Radez (dradez@redhat.com)
#
#Uses Vagrant and VirtualBox
#
Tim Rozet's avatar
Tim Rozet committed
8
vm_index=4
9 10 11 12
virsh destroy instack 2> /dev/null || echo -n ''
virsh undefine instack --remove-all-storage 2> /dev/null || echo -n ''

rm -f /var/lib/libvirt/images/instack.qcow2 2> /dev/null
Dan Radez's avatar
Dan Radez committed
13
for i in $(seq 0 $vm_index); do
Dan Radez's avatar
Dan Radez committed
14 15 16
  virsh destroy baremetalbrbm_brbm1_$i 2> /dev/null || echo -n ''
  virsh undefine baremetalbrbm_brbm1_$i --remove-all-storage 2> /dev/null || echo -n ''
  rm -f /var/lib/libvirt/images/baremetalbrbm_brbm1_${i}.qcow2 2> /dev/null
Tim Rozet's avatar
Tim Rozet committed
17
done