aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-01-27 10:23:18 +0000
committerGerrit Code Review <review@openstack.org>2016-01-27 10:23:18 +0000
commitc533945d8ae08508c3efd12a59497877a90b804c (patch)
tree2928abf360dadb2712934af637cf63ef0d10ec64
parent1360c9f776410ba1418843d838b7e005fe53b1dc (diff)
parent0f01d3ebc7c96265c1a8f304ad72ed5e773b2178 (diff)
downloadkolla-c533945d8ae08508c3efd12a59497877a90b804c.tar.gz
kolla-c533945d8ae08508c3efd12a59497877a90b804c.zip
Merge "Add the keyfile option to decrypt the passwords.yml"
-rwxr-xr-xtools/kolla-ansible13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/kolla-ansible b/tools/kolla-ansible
index 021af79ac..73d7316f5 100755
--- a/tools/kolla-ansible
+++ b/tools/kolla-ansible
@@ -30,6 +30,7 @@ Usage: $0 COMMAND [options]
Options:
--inventory, -i <inventory_path> Specify path to ansible inventory file
--playbook, -p <playbook_path> Specify path to ansible playbook file
+ --keyfile, -k <key_file> Specify path to ansible vault keyfile
--help, -h Show this usage information
--tags, -t <tags> Only run plays and tasks tagged with these values
@@ -41,9 +42,11 @@ Commands:
EOF
}
-SHORT_OPTS="hi:p:t:"
-LONG_OPTS="help,inventory:,playbook:,tags:"
+
+SHORT_OPTS="hi:p:t:k:"
+LONG_OPTS="help,inventory:,playbook:,tags:,keyfile:"
ARGS=$(getopt -o "${SHORT_OPTS}" -l "${LONG_OPTS}" --name "$0" -- "$@") || { usage >&2; exit 2; }
+
eval set -- "$ARGS"
find_base_dir
@@ -69,6 +72,12 @@ while [ "$#" -gt 0 ]; do
shift 2
;;
+ (--keyfile|-k)
+ VAULT_PASS_FILE="$2"
+ EXTRA_OPTS="$EXTRA_OPTS --vault-password-file=$VAULT_PASS_FILE"
+ shift 2
+ ;;
+
(--help|-h)
usage
shift