diff --git a/tasks/ceph_install_python_libs.yml b/tasks/ceph_install_python_libs.yml index 5c812e7..96dc781 100644 --- a/tasks/ceph_install_python_libs.yml +++ b/tasks/ceph_install_python_libs.yml @@ -36,10 +36,28 @@ changed_when: false register: rbd_module_path +- name: Register cephfs module path + command: python -c 'import cephfs; print cephfs.__file__' + changed_when: false + failed_when: false + register: cephfs_module_path + +- name: Register ceph_volume_client path + command: python -c 'import ceph_volume_client; print ceph_volume_client.__file__' + changed_when: false + failed_when: false + register: ceph_volume_client_module_path + +- name: Register ceph_argparse path + command: python -c 'import ceph_argparse; print ceph_argparse.__file__' + changed_when: false + failed_when: false + register: ceph_argparse_module_path + - name: Link rados module into the venv file: src: "{{ rados_module_path.stdout }}" - dest: "{{ venv_python_lib_folder }}/site-packages/{{ rados_module_path.stdout | basename }}" + dest: "{{ venv_python_lib_folder }}/site-packages/{{ rados_module_path.stdout | basename | replace('.pyc', '.py') }}" state: link force: "yes" notify: @@ -48,8 +66,41 @@ - name: Link rbd module into the venv file: src: "{{ rbd_module_path.stdout }}" - dest: "{{ venv_python_lib_folder }}/site-packages/{{ rbd_module_path.stdout | basename }}" + dest: "{{ venv_python_lib_folder }}/site-packages/{{ rbd_module_path.stdout | basename | replace('.pyc', '.py') }}" state: link force: "yes" notify: - Restart os services + +- name: Link cephfs module into the venv + file: + src: "{{ cephfs_module_path.stdout }}" + dest: "{{ openstack_service_venv_bin | dirname }}/lib/python2.7/site-packages/{{ cephfs_module_path.stdout | basename | replace('.pyc', '.py') }}" + state: link + force: "yes" + when: + - cephfs_module_path.rc == 0 + notify: + - Restart os services + +- name: Link ceph_volume_client module into the venv + file: + src: "{{ ceph_volume_client_module_path.stdout }}" + dest: "{{ openstack_service_venv_bin | dirname }}/lib/python2.7/site-packages/{{ ceph_volume_client_module_path.stdout | basename | replace('.pyc', '.py') }}" + state: link + force: "yes" + when: + - ceph_volume_client_module_path.rc == 0 + notify: + - Restart os services + +- name: Link ceph_argparse module into the venv + file: + src: "{{ ceph_argparse_module_path.stdout }}" + dest: "{{ openstack_service_venv_bin | dirname }}/lib/python2.7/site-packages/{{ ceph_argparse_module_path.stdout | basename | replace('.pyc', '.py') }}" + state: link + force: "yes" + when: + - ceph_argparse_module_path.rc == 0 + notify: + - Restart os services