Comment 6 for bug 1530319

Revision history for this message
Mark Goddard (mgoddard) wrote : Re: kolla ansible can not work in virtualenv

The first part of the patch in comment #5 works for me:

$ diff /home/csj/.virtualenvs/kolla/bin/kolla-ansible /home/csj/.virtualenvs/temp/bin/kolla-ansible
12,13d11
< elif [[ ${dir_name} == "${VIRTUAL_ENV}/bin" ]]; then
< BASEDIR="${VIRTUAL_ENV}/share/kolla"

I don't think the latter part makes quite as much sense. We can't necessarily use the local VIRTUAL_ENV environment variable to determine the python interpreter to use on the remote hosts. If a virtualenv is in use on the remote hosts, this could be achieved by passing the -e argument to kolla-ansible manually.