diff options
| author | SamYaple <sam@yaple.net> | 2016-02-05 19:37:24 +0000 |
|---|---|---|
| committer | SamYaple <sam@yaple.net> | 2016-02-12 03:38:45 +0000 |
| commit | 9f7c3b630d0c1f3902063c03588c04dd84bd36ea (patch) | |
| tree | 5093cc9ab766ad11861da683bfddd1e829c07e67 /tools | |
| parent | 51e9046ea79a95fb26ea629b593cb4197246725e (diff) | |
| download | kolla-9f7c3b630d0c1f3902063c03588c04dd84bd36ea.tar.gz kolla-9f7c3b630d0c1f3902063c03588c04dd84bd36ea.zip | |
Fix non-root deploys
TrivialFix
Change-Id: Id0e7cf9e1c0c4259b8a50c39e95214103256517b
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/kolla-ansible | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/kolla-ansible b/tools/kolla-ansible index cf9d1038d..0acb9d2d5 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 + --configdir <config_path> Specify path to directory with globals.yml --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 @@ -45,7 +46,7 @@ EOF SHORT_OPTS="hi:p:t:k:v" -LONG_OPTS="help,inventory:,playbook:,tags:,keyfile:,verbose" +LONG_OPTS="help,inventory:,playbook:,tags:,keyfile:,verbose,configdir:" ARGS=$(getopt -o "${SHORT_OPTS}" -l "${LONG_OPTS}" --name "$0" -- "$@") || { usage >&2; exit 2; } eval set -- "$ARGS" @@ -54,8 +55,9 @@ 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" VERBOSITY= +EXTRA_OPTS= +CONFIG_DIR="/etc/kolla" while [ "$#" -gt 0 ]; do case "$1" in @@ -80,6 +82,11 @@ while [ "$#" -gt 0 ]; do shift 1 ;; + (--configdir) + CONFIG_DIR="$2" + shift 2 + ;; + (--keyfile|-k) VAULT_PASS_FILE="$2" EXTRA_OPTS="$EXTRA_OPTS --vault-password-file=$VAULT_PASS_FILE" @@ -132,5 +139,6 @@ case "$1" in ;; esac -CMD="ansible-playbook -i $INVENTORY $EXTRA_OPTS $PLAYBOOK $VERBOSITY" +CONFIG_OPTS="-e @${CONFIG_DIR}/globals.yml -e @${CONFIG_DIR}/passwords.yml" +CMD="ansible-playbook -i $INVENTORY $CONFIG_OPTS $EXTRA_OPTS $PLAYBOOK $VERBOSITY" process_cmd |
