aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJeffrey Zhang <zhang.lei.fly@gmail.com>2016-01-19 12:41:38 +0800
committerJeffrey Zhang <zhang.lei.fly@gmail.com>2016-01-25 09:54:22 +0800
commit94f5e870028ef8bf1336c805d6c9e69789fab432 (patch)
tree17ea91306196d5c131bef4dcc50e399f7e78217b /tools
parent5c7061250cda31b7900c37518151e5c2bb3456c0 (diff)
downloadkolla-94f5e870028ef8bf1336c805d6c9e69789fab432.tar.gz
kolla-94f5e870028ef8bf1336c805d6c9e69789fab432.zip
Expose the ansible-playout tags parameter
we can deploy specific services by using tags feature. It is very useful, especially in develop/test stage. TrivaiFix Change-Id: I21cc55e6f1a32a5c57570bc2c2fb9b084e513af8
Diffstat (limited to 'tools')
-rwxr-xr-xtools/kolla-ansible10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/kolla-ansible b/tools/kolla-ansible
index 7f81ed950..baaee60d3 100755
--- a/tools/kolla-ansible
+++ b/tools/kolla-ansible
@@ -31,6 +31,7 @@ Options:
--inventory, -i <inventory_path> Specify path to ansible inventory file
--playbook, -p <playbook_path> Specify path to ansible playbook file
--help, -h Show this usage information
+ --tags, -t <tags> Only run plays and tasks tagged with these values
Commands:
prechecks Do pre-deployment checks for hosts
@@ -40,13 +41,14 @@ Commands:
EOF
}
-ARGS=$(getopt -o hi:p: -l help,inventory:,playbook: --name "$0" -- "$@") || { usage >&2; exit 2; }
+ARGS=$(getopt -o hi:p:t: -l help,inventory:,playbook: --name "$0" -- "$@") || { usage >&2; exit 2; }
eval set -- "$ARGS"
find_base_dir
INVENTORY="${BASEDIR}/ansible/inventory/all-in-one"
PLAYBOOK="${BASEDIR}/ansible/site.yml"
+EXTRA_OPTS="-e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml"
while [ "$#" -gt 0 ]; do
case "$1" in
@@ -60,6 +62,10 @@ while [ "$#" -gt 0 ]; do
PLAYBOOK="$2"
shift 2
;;
+ (--tags|-t)
+ EXTRA_OPTS="$EXTRA_OPTS --tags $2"
+ shift 2
+ ;;
(--help|-h)
usage
@@ -79,8 +85,6 @@ while [ "$#" -gt 0 ]; do
esac
done
-EXTRA_OPTS="-e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml"
-
case "$1" in
(prechecks)