instack-undercloud/scripts/instack-delete-overcloud

16 lines
349 B
Bash
Executable File

#!/bin/bash
set -eu
# delete the stack
heat stack-delete overcloud || true
SUCCESSFUL_MATCH_OUTPUT="Stack not found: overcloud" tripleo wait_for 6 10 heat stack-show overcloud
# cleanup the baremetal-nodes
node_ids=$(ironic node-list | tail -n +4 | head -n -1 | awk -F "| " '{print $2}')
for id in $node_ids; do
ironic node-delete $id
done