Files
nomad/demo/hostvolume/teardown.sh
Daniel Bennett e76f5e0b4c dynamic host volumes: volume fingerprinting (#24613)
and expand the demo a bit
2024-12-19 09:25:54 -05:00

18 lines
366 B
Bash
Executable File

#!/usr/bin/env bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
set -xeuo pipefail
nomad job stop job || true
for _ in {1..5}; do
sleep 3
ids="$(nomad volume status -type=host -verbose | awk '/ternal-plugin/ {print$1}')"
test -z "$ids" && break
for id in $ids; do
nomad volume delete -type=host "$id" || continue
done
done