aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2021-02-11 09:23:21 +0000
committerMark Goddard <mark@stackhpc.com>2021-02-12 17:58:04 +0000
commit519ca1c08322d1e670c13e60f31b22230fbdc9d3 (patch)
tree6fa2ef9551b5d232965991b5568547b30a78b969 /tools
parent638e00cfb1ba93448eb12efbd8d3f3c2662fbe53 (diff)
downloadkolla-ansible-519ca1c08322d1e670c13e60f31b22230fbdc9d3.tar.gz
kolla-ansible-519ca1c08322d1e670c13e60f31b22230fbdc9d3.zip
Fix installation with pip install --user
If kolla-ansible is installed via pip install --user, currently the kolla-ansible script is unable to locate the installed playbooks. This leads to a failure when running commands. This change fixes the issue by checking for the user's .local directory as a possible installation path. This fixes some of the scenario tests which were failing after switching to a user installation in Ifaf1948ed5d42eebaa62d7bad375bbfc12b134d5. Most tests did not fail since the kolla-ansible script in the source checkout was used. Closes-Bug: #1915527 Change-Id: I5b47a146627d06bb3fe4a747c5f20290c726b0f9
Diffstat (limited to 'tools')
-rwxr-xr-xtools/kolla-ansible2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/kolla-ansible b/tools/kolla-ansible
index dc30fa7c7..56e675e8a 100755
--- a/tools/kolla-ansible
+++ b/tools/kolla-ansible
@@ -75,6 +75,8 @@ function find_base_dir {
BASEDIR=/usr/share/kolla-ansible
elif [[ ${dir_name} == "/usr/local/bin" ]]; then
BASEDIR=/usr/local/share/kolla-ansible
+ elif [[ ${dir_name} == ~/.local/bin ]]; then
+ BASEDIR=~/.local/share/kolla-ansible
elif [[ -n ${VIRTUAL_ENV} ]] && [[ ${dir_name} == "$(readlink -e "${VIRTUAL_ENV}/bin")" ]]; then
if test -f ${VIRTUAL_ENV}/lib/python*/site-packages/kolla-ansible.egg-link; then
# Editable install.