Merge "Update destroy include images arg to LONGOPT"
This commit is contained in:
commit
c930a0045c
@ -43,7 +43,7 @@ Commands:
|
|||||||
mariadb_recovery Recover a completely stopped mariadb cluster
|
mariadb_recovery Recover a completely stopped mariadb cluster
|
||||||
bootstrap-servers bootstrap servers with kolla deploy dependencies
|
bootstrap-servers bootstrap servers with kolla deploy dependencies
|
||||||
destroy Destroy Kolla containers, volumes and host configuration
|
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 Deploy and start all kolla containers
|
||||||
deploy-bifrost Deploy and start bifrost container
|
deploy-bifrost Deploy and start bifrost container
|
||||||
deploy-servers Enroll and deploy servers with bifrost
|
deploy-servers Enroll and deploy servers with bifrost
|
||||||
@ -58,7 +58,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
SHORT_OPTS="hi:p:t:k:e:v"
|
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; }
|
ARGS=$(getopt -o "${SHORT_OPTS}" -l "${LONG_OPTS}" --name "$0" -- "$@") || { usage >&2; exit 2; }
|
||||||
|
|
||||||
eval set -- "$ARGS"
|
eval set -- "$ARGS"
|
||||||
@ -72,6 +72,7 @@ EXTRA_OPTS=
|
|||||||
CONFIG_DIR="/etc/kolla"
|
CONFIG_DIR="/etc/kolla"
|
||||||
PASSWORDS_FILE="${CONFIG_DIR}/passwords.yml"
|
PASSWORDS_FILE="${CONFIG_DIR}/passwords.yml"
|
||||||
DANGER_CONFIRM=
|
DANGER_CONFIRM=
|
||||||
|
INCLUDE_IMAGES=
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]; do
|
while [ "$#" -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@ -106,6 +107,11 @@ while [ "$#" -gt 0 ]; do
|
|||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
(--include-images)
|
||||||
|
INCLUDE_IMAGES="$1"
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
|
||||||
(--key|-k)
|
(--key|-k)
|
||||||
VAULT_PASS_FILE="$2"
|
VAULT_PASS_FILE="$2"
|
||||||
EXTRA_OPTS="$EXTRA_OPTS --vault-password-file=$VAULT_PASS_FILE"
|
EXTRA_OPTS="$EXTRA_OPTS --vault-password-file=$VAULT_PASS_FILE"
|
||||||
@ -152,6 +158,9 @@ case "$1" in
|
|||||||
(destroy)
|
(destroy)
|
||||||
ACTION="Destroy Kolla containers, volumes and host configuration"
|
ACTION="Destroy Kolla containers, volumes and host configuration"
|
||||||
PLAYBOOK="${BASEDIR}/ansible/destroy.yml"
|
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
|
if [[ "${DANGER_CONFIRM}" != "--yes-i-really-really-mean-it" ]]; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
WARNING:
|
WARNING:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user