aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDavid Moreau-Simard <dms@redhat.com>2017-07-22 21:45:43 -0400
committerDavid Moreau-Simard <dms@redhat.com>2017-07-22 23:13:16 -0400
commit77f1812e002e47314de4c7b70714d6d36907a05b (patch)
treecca301af7aa9417b619e0987bfe94a6b32ad148e /tools
parent23ac09c955a734e8344d11545c2041eede55f0bb (diff)
downloadkolla-ansible-77f1812e002e47314de4c7b70714d6d36907a05b.tar.gz
kolla-ansible-77f1812e002e47314de4c7b70714d6d36907a05b.zip
Dynamically retrieve the location of ARA to work on both py2 & py3
Remove the hardcoded callback path with python2.7 and use the virtualenv python to determine the path where ARA is installed so that no matter if we're running py2 or py3, it will work. Change-Id: Ica0b94aeebabaeca8416a9768fadd12d3925e7b2
Diffstat (limited to 'tools')
-rwxr-xr-xtools/setup_gate.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh
index 0da013343..f0758fab0 100755
--- a/tools/setup_gate.sh
+++ b/tools/setup_gate.sh
@@ -132,9 +132,10 @@ function setup_ansible {
setup_inventory
sudo mkdir /etc/ansible
+ ara_location=$(python -c "import os,ara; print(os.path.dirname(ara.__file__))")
sudo tee /etc/ansible/ansible.cfg<<EOF
[defaults]
-callback_plugins = /usr/lib/python2.7/site-packages/ara/plugins/callbacks:\$VIRTUAL_ENV/lib/python2.7/site-packages/ara/plugins/callbacks
+callback_plugins = ${ara_location}/plugins/callbacks
host_key_checking = False
EOF