use environmental variables for ansible ssh configuration

quickstart does not set the ansible ssh configuration by default.
This change sets ANSIBLE_SSH_ARGS if it's not already set.

Change-Id: I61d8499fe16eb102a285972d347cef5acdbc71e8
This commit is contained in:
Wesley Hayutin 2016-06-13 13:34:37 -04:00 committed by John Trowbridge
parent 5e0a381ff9
commit 540eae7b55
2 changed files with 8 additions and 0 deletions

5
ansible_ssh_env.sh Normal file
View File

@ -0,0 +1,5 @@
: ${OPT_WORKDIR:=$HOME/.quickstart}
#ssh config
: ${SSH_CONFIG=$OPT_WORKDIR/ssh.config.ansible}
: ${ANSIBLE_SSH_ARGS="-F ${SSH_CONFIG}"}

View File

@ -304,6 +304,9 @@ set -ex
export ANSIBLE_CONFIG=$OOOQ_DIR/ansible.cfg
export ANSIBLE_INVENTORY=$OPT_WORKDIR/hosts
#set the ansible ssh.config options if not already set.
source $OOOQ_DIR/ansible_ssh_env.sh
if [ "$OPT_RETAIN_INVENTORY_FILE" = 0 ]; then
# Clear out inventory file to avoid tripping over data
# from a previous invocation