From 454b933b6d50d0a03ff3193abf7e5f56619d5d1a Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Mon, 28 Nov 2016 08:47:45 -0500 Subject: [PATCH] Fix virtualenv-tools issue please see https://github.com/fireteam/virtualenv-tools/issues/5 This make installation of the virtualenv impossible on CentOS7 since you endup with python > python2.7 and python2.7 > python lrwxrwxrwx. 1 root root 9 Nov 24 20:49 python -> python2.7 lrwxrwxrwx. 1 root root 6 Nov 14 20:03 python2 -> python lrwxrwxrwx. 1 root root 6 Nov 14 20:03 python2.7 -> python Change-Id: Id96a35e1c7c3bc200e7fa006352159d377823f4e Related-Bug: #1637509 Partial-Bug: #1644629 --- tasks/horizon_install.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tasks/horizon_install.yml b/tasks/horizon_install.yml index d273a2c5..78377760 100644 --- a/tasks/horizon_install.yml +++ b/tasks/horizon_install.yml @@ -105,6 +105,15 @@ delay: 2 when: horizon_optional_pip_packages | length > 0 +- name: CentOS remove python from path first + file: + path: "{{ horizon_bin | dirname }}/bin/python2.7" + state: "absent" + when: + - ansible_pkg_mgr == 'yum' + - not horizon_developer_mode | bool + - horizon_get_venv | changed or horizon_venv_dir | changed + - name: Update virtualenv path command: > virtualenv-tools --update-path=auto --reinitialize {{ horizon_bin | dirname }}