Skip to content

Commit

Permalink
Fix virtualenv-tools issue
Browse files Browse the repository at this point in the history
please see fireteam/virtualenv-tools#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: Ieb97e0b245b870c0b5b42bf9b52e7400a65e38ad
Related-Bug: #1637509
Partial-Bug: #1644629
  • Loading branch information
mgariepy committed Nov 28, 2016
1 parent 4e9fe4e commit 1d4b325
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tasks/magnum_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@
when: magnum_developer_mode | bool
notify: Restart magnum services

- name: CentOS remove python from path first
file:
path: "{{ magnum_bin | dirname }}/bin/python2.7"
state: "absent"
when:
- ansible_pkg_mgr == 'yum'
- not magnum_developer_mode | bool
- magnum_get_venv | changed or magnum_venv_dir | changed

- name: Update virtualenv path
command: >
virtualenv-tools --update-path=auto --reinitialize {{ magnum_bin | dirname }}
Expand Down

0 comments on commit 1d4b325

Please sign in to comment.