Merge "Dynamically retrieve the location of ARA to work on both py2 & py3"

This commit is contained in:
Jenkins 2017-08-04 14:40:18 +00:00 committed by Gerrit Code Review
commit 28a50d51c1

View File

@ -120,7 +120,10 @@ else
# This installs from pypi
/opt/ansible-runtime/bin/pip install ara
fi
export ANSIBLE_CALLBACK_PLUGINS="/etc/ansible/roles/plugins/callback:/opt/ansible-runtime/lib/python2.7/site-packages/ara/plugins/callbacks"
# Dynamically retrieve the location of the ARA callback so we are able to find
# it on both py2 and py3
ara_location=$(/opt/ansible-runtime/bin/python -c "import os,ara; print(os.path.dirname(ara.__file__))")
export ANSIBLE_CALLBACK_PLUGINS="/etc/ansible/roles/plugins/callback:${ara_location}/plugins/callbacks"
# Log some data about the instance and the rest of the system
log_instance_info