Skip to content
Snippets Groups Projects
Commit 8808c8a6 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Add support for vault passwords"

parents cc3a3046 684194ff
No related branches found
No related tags found
No related merge requests found
---
features:
- |
Implemented support for using ansible-vault passwords
in kolla-ansible command to decrypt ``/etc/kolla/passwords.yml``.
...@@ -43,6 +43,9 @@ Options: ...@@ -43,6 +43,9 @@ Options:
--extra, -e <ansible variables> Set additional variables as key=value or YAML/JSON passed to ansible-playbook --extra, -e <ansible variables> Set additional variables as key=value or YAML/JSON passed to ansible-playbook
--passwords <passwords_path> Specify path to the passwords file --passwords <passwords_path> Specify path to the passwords file
--limit <host> Specify host to run plays --limit <host> Specify host to run plays
--vault-id <@prompt or path> Specify @prompt or password file (Ansible >= 2.4)
--ask-vault-pass Ask for vault password
--vault-password-file <path> Specify password file for vault decrypt
--verbose, -v Increase verbosity of ansible-playbook --verbose, -v Increase verbosity of ansible-playbook
Commands: Commands:
...@@ -77,6 +80,9 @@ cat <<EOF ...@@ -77,6 +80,9 @@ cat <<EOF
--extra -e --extra -e
--passwords --passwords
--limit --limit
--vault-id
--ask-vault-pass
--vault-password-file
--verbose -v --verbose -v
prechecks prechecks
check check
...@@ -97,7 +103,7 @@ EOF ...@@ -97,7 +103,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:,limit:,yes-i-really-really-mean-it,include-images,include-dev" LONG_OPTS="help,inventory:,playbook:,tags:,key:,extra:,verbose,configdir:,passwords:,limit:,vault-id:,ask-vault-pass,vault-password-file:,yes-i-really-really-mean-it,include-images,include-dev"
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"
...@@ -170,15 +176,32 @@ while [ "$#" -gt 0 ]; do ...@@ -170,15 +176,32 @@ while [ "$#" -gt 0 ]; do
EXTRA_OPTS="$EXTRA_OPTS -e $2" EXTRA_OPTS="$EXTRA_OPTS -e $2"
shift 2 shift 2
;; ;;
(--passwords) (--passwords)
PASSWORDS_FILE="$2" PASSWORDS_FILE="$2"
shift 2 shift 2
;; ;;
(--limit) (--limit)
EXTRA_OPTS="$EXTRA_OPTS --limit $2" EXTRA_OPTS="$EXTRA_OPTS --limit $2"
shift 2 shift 2
;; ;;
(--vault-id)
EXTRA_OPTS="$EXTRA_OPTS --vault-id $2"
shift 2
;;
(--ask-vault-pass)
VERBOSITY="$EXTRA_OPTS --ask-vault-pass"
shift 1
;;
(--vault-password-file)
EXTRA_OPTS="$EXTRA_OPTS --vault-password-file $2"
shift 2
;;
(--help|-h) (--help|-h)
usage usage
shift shift
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment