aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHui Kang <kangh@us.ibm.com>2016-03-24 18:31:35 -0400
committerHui Kang <kangh@us.ibm.com>2016-03-29 17:59:33 -0400
commit25393eb28f34f693fc11228926c1c776e269609f (patch)
tree8fbb34cb4bd54725aad7ae09710e9e129f4894ee /tools
parentb333f44a534374ac59a0e78960fc40f6cf6a6715 (diff)
downloadkolla-25393eb28f34f693fc11228926c1c776e269609f.tar.gz
kolla-25393eb28f34f693fc11228926c1c776e269609f.zip
Pass extra variables through kolla-ansible to ansible-playbook
Change-Id: I4ddad85aadfac4047460085ec6bc0fcabd718253 Closes-Bug: #1561757
Diffstat (limited to 'tools')
-rwxr-xr-xtools/kolla-ansible10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/kolla-ansible b/tools/kolla-ansible
index 11ed742c7..16634b268 100755
--- a/tools/kolla-ansible
+++ b/tools/kolla-ansible
@@ -34,6 +34,7 @@ Options:
--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
+ --extra, -e <ansible variables> Set additional variables as key=value or YAML/JSON passed to ansible-playbook
--verbose, -v Increase verbosity of ansible-playbook
Commands:
@@ -48,8 +49,8 @@ EOF
}
-SHORT_OPTS="hi:p:t:k:v"
-LONG_OPTS="help,inventory:,playbook:,tags:,keyfile:,verbose,configdir:"
+SHORT_OPTS="hi:p:t:k:e:v"
+LONG_OPTS="help,inventory:,playbook:,tags:,keyfile:,extra:,verbose,configdir:"
ARGS=$(getopt -o "${SHORT_OPTS}" -l "${LONG_OPTS}" --name "$0" -- "$@") || { usage >&2; exit 2; }
eval set -- "$ARGS"
@@ -96,6 +97,11 @@ while [ "$#" -gt 0 ]; do
shift 2
;;
+ (--extra|-e)
+ EXTRA_OPTS="$EXTRA_OPTS -e $2"
+ shift 2
+ ;;
+
(--help|-h)
usage
shift