tripleo-quickstart-extras/roles/overcloud-delete/templates/overcloud_delete.sh.j2
Harry Rybacki ce7982192f Integrate undercloud_user var into oooq-extras
We need to differentiate local_working_dir from working_dir
as well as decouple the stack user from `ansible_user` var.
Both of these are causing issues as we begin to automate
deployments in more environments.

- Cleanup duplicate variables that are consumed via extras-common
  - Note: extras-common depends on the common role in OOOQ
- Cleanup redundant var and superfluous quotes from overcloud-scale
  role
- Cleanup redundant comments in <role>/defaults/main.yml

Closes-bug: 1654574
Change-Id: I9c7a3166ed1fc5042c11e420223134ea912b45c5
2017-01-18 09:32:16 -05:00

23 lines
553 B
Django/Jinja

### --start_docs
## Delete the overcloud deployment
## ===============================
## * Gather informations on the deployment
## ::
source {{ working_dir }}/stackrc
OVERCLOUD_NAME="overcloud"
OVERCLOUD_ID=$(openstack stack list | grep "$OVERCLOUD_NAME" | awk '{print $2}')
echo $OVERCLOUD_ID > {{ working_dir }}/overcloud_id
## * select the correct command for the deletion
## ::
if heat stack-delete --help | grep -q "\-\-yes"; then
heat stack-delete --yes "$OVERCLOUD_NAME"
else
heat stack-delete "$OVERCLOUD_NAME"
fi
### --stop_docs