summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bourke <paul.bourke@oracle.com>2016-09-02 15:00:30 +0100
committerPaul Bourke <paul.bourke@oracle.com>2016-09-02 15:02:06 +0100
commitcd9774baa80f11ff5894dd2c32776507f856705d (patch)
tree4422b77bde3bd11c09e95f92392aac4ecab1e747
parentb6c40d9deb40404aa83b9e391d12ab1de3eae720 (diff)
downloadkolla-cd9774baa80f11ff5894dd2c32776507f856705d.tar.gz
kolla-cd9774baa80f11ff5894dd2c32776507f856705d.zip
Update destroy include images arg to LONGOPT
Change the argument for including images as part of destroy from '-e destroy_include_images=yes' to a more consistent --include-images. TrivialFix Change-Id: I0a29c69121697cab751578093cc7ca58011eb853
-rwxr-xr-xtools/kolla-ansible13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/kolla-ansible b/tools/kolla-ansible
index 941c49a46..884be19e5 100755
--- a/tools/kolla-ansible
+++ b/tools/kolla-ansible
@@ -43,7 +43,7 @@ Commands:
mariadb_recovery Recover a completely stopped mariadb cluster
bootstrap-servers bootstrap servers with kolla deploy dependencies
destroy Destroy Kolla containers, volumes and host configuration
- ('-e destroy_include_images=yes' to also destroy Kolla images)
+ (--include-images to also destroy Kolla images)
deploy Deploy and start all kolla containers
deploy-bifrost Deploy and start bifrost container
deploy-servers Enroll and deploy servers with bifrost
@@ -58,7 +58,7 @@ EOF
SHORT_OPTS="hi:p:t:k:e:v"
-LONG_OPTS="help,inventory:,playbook:,tags:,key:,extra:,verbose,configdir:,passwords:,yes-i-really-really-mean-it"
+LONG_OPTS="help,inventory:,playbook:,tags:,key:,extra:,verbose,configdir:,passwords:,yes-i-really-really-mean-it,include-images"
ARGS=$(getopt -o "${SHORT_OPTS}" -l "${LONG_OPTS}" --name "$0" -- "$@") || { usage >&2; exit 2; }
eval set -- "$ARGS"
@@ -72,6 +72,7 @@ EXTRA_OPTS=
CONFIG_DIR="/etc/kolla"
PASSWORDS_FILE="${CONFIG_DIR}/passwords.yml"
DANGER_CONFIRM=
+INCLUDE_IMAGES=
while [ "$#" -gt 0 ]; do
case "$1" in
@@ -106,6 +107,11 @@ while [ "$#" -gt 0 ]; do
shift 1
;;
+ (--include-images)
+ INCLUDE_IMAGES="$1"
+ shift 1
+ ;;
+
(--key|-k)
VAULT_PASS_FILE="$2"
EXTRA_OPTS="$EXTRA_OPTS --vault-password-file=$VAULT_PASS_FILE"
@@ -152,6 +158,9 @@ case "$1" in
(destroy)
ACTION="Destroy Kolla containers, volumes and host configuration"
PLAYBOOK="${BASEDIR}/ansible/destroy.yml"
+ if [[ "${INCLUDE_IMAGES}" == "--include-images" ]]; then
+ EXTRA_OPTS="$EXTRA_OPTS -e destroy_include_images=yes"
+ fi
if [[ "${DANGER_CONFIRM}" != "--yes-i-really-really-mean-it" ]]; then
cat << EOF
WARNING: