Check for base VM in default project; rm if exists
This commit is contained in:
parent
3aaf137707
commit
00b9c9bb55
@ -5,6 +5,10 @@ cd "$(dirname "$0")"
|
|||||||
|
|
||||||
bash -c "./stub_lxc_profile.sh --lxd-hostname=$BASE_IMAGE_VM_NAME"
|
bash -c "./stub_lxc_profile.sh --lxd-hostname=$BASE_IMAGE_VM_NAME"
|
||||||
|
|
||||||
|
if lxc list -q --project default | grep -q "$BASE_IMAGE_VM_NAME" ; then
|
||||||
|
lxc delete -f "$BASE_IMAGE_VM_NAME" --project=default
|
||||||
|
fi
|
||||||
|
|
||||||
# let's download our base image.
|
# let's download our base image.
|
||||||
if ! lxc image list --format csv --columns l | grep -q "$UBUNTU_BASE_IMAGE_NAME"; then
|
if ! lxc image list --format csv --columns l | grep -q "$UBUNTU_BASE_IMAGE_NAME"; then
|
||||||
# if the image if cached locally, import it from disk, otherwise download it from ubuntu
|
# if the image if cached locally, import it from disk, otherwise download it from ubuntu
|
||||||
|
Loading…
Reference in New Issue
Block a user