summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-09-07 01:08:07 +0000
committerGerrit Code Review <review@openstack.org>2016-09-07 01:08:07 +0000
commitc930a0045cabdf3571a421973f60d4e534f64de8 (patch)
tree66a04ac1323914ba3a9f8ba3fbf481f5ad719ed2 /tools
parent682025c9e2fe834c697e96d219c54b70e641cbf8 (diff)
parentcd9774baa80f11ff5894dd2c32776507f856705d (diff)
downloadkolla-c930a0045cabdf3571a421973f60d4e534f64de8.tar.gz
kolla-c930a0045cabdf3571a421973f60d4e534f64de8.zip
Merge "Update destroy include images arg to LONGOPT"
Diffstat (limited to 'tools')
-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: