Fix rados linking for py3
This patch detects correct lib path of gnocchi and use it for symlink destination Change-Id: I7b88a053ac5d779bc53a32c1294e76e2233cdd9e
This commit is contained in:
parent
7f53a9d0ad
commit
26637323d5
|
@ -14,14 +14,19 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Register rados module path
|
- name: Register rados module path
|
||||||
command: python -c 'import rados; print rados.__file__'
|
command: "{{ gnocchi_venv_python_executable }} -c 'import rados; print(rados.__file__)'"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: rados_module_path
|
register: rados_module_path
|
||||||
|
|
||||||
|
- name: Register gnocchi lib path
|
||||||
|
command: "{{ gnocchi_bin }}/python -c 'import gnocchi; print(gnocchi.__file__)'"
|
||||||
|
changed_when: false
|
||||||
|
register: gnocchi_module_path
|
||||||
|
|
||||||
- name: Link rados module into the venv
|
- name: Link rados module into the venv
|
||||||
file:
|
file:
|
||||||
src: "{{ rados_module_path.stdout }}"
|
src: "{{ rados_module_path.stdout }}"
|
||||||
dest: "{{ gnocchi_bin | dirname }}/lib/python2.7/site-packages/{{ rados_module_path.stdout | basename }}"
|
dest: "{{ gnocchi_module_path.stdout | dirname | dirname }}/{{ rados_module_path.stdout | basename }}"
|
||||||
state: link
|
state: link
|
||||||
force: "yes"
|
force: "yes"
|
||||||
notify:
|
notify:
|
||||||
|
|
Loading…
Reference in New Issue