From 124415972595ab2d9b3c50320bfe19161cc16599 Mon Sep 17 00:00:00 2001 From: Marc Gariepy Date: Mon, 28 Nov 2016 08:31:27 -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: I101fe7082cac887dc4299a0f5ec92bdce626bb79 Related-Bug: #1637509 Partial-Bug: #1644629 --- tasks/ceilometer_install.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tasks/ceilometer_install.yml b/tasks/ceilometer_install.yml index dc8402b2..e62c3c30 100644 --- a/tasks/ceilometer_install.yml +++ b/tasks/ceilometer_install.yml @@ -89,6 +89,15 @@ when: ceilometer_developer_mode | bool notify: Restart ceilometer services +- name: CentOS remove python from path first + file: + path: "{{ ceilometer_bin | dirname }}/bin/python2.7" + state: "absent" + when: + - ansible_pkg_mgr == 'yum' + - not ceilometer_developer_mode | bool + - ceilometer_get_venv | changed or ceilometer_venv_dir | changed + - name: Update virtualenv path command: > virtualenv-tools --update-path=auto --reinitialize {{ ceilometer_bin | dirname }}