Use ceph_client symlinking process
This moves ceph_client include from the playbook into the role itself to leverage libraries symlinking inside venv and to align with other roles Change-Id: I9f1339b0b592e18a227b9a53cad9ef4af7fa82c0 Needed-By: https://review.opendev.org/c/openstack/openstack-ansible/+/769974
This commit is contained in:
parent
01f88ffaa3
commit
b5c233cdad
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
# Copyright 2014, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Register rados module path
|
||||
command: "{{ gnocchi_venv_python_executable }} -c 'import rados; print(rados.__file__)'"
|
||||
changed_when: false
|
||||
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
|
||||
file:
|
||||
src: "{{ rados_module_path.stdout }}"
|
||||
dest: "{{ gnocchi_module_path.stdout | dirname | dirname }}/{{ rados_module_path.stdout | basename }}"
|
||||
state: link
|
||||
force: "yes"
|
||||
notify:
|
||||
- Restart gnocchi services
|
||||
- Restart web server
|
|
@ -132,12 +132,21 @@
|
|||
tags:
|
||||
- gnocchi-config
|
||||
|
||||
- import_tasks: gnocchi_ceph_python_libs.yml
|
||||
- name: Include ceph_client role
|
||||
include_role:
|
||||
name: "ceph_client"
|
||||
apply:
|
||||
tags:
|
||||
- ceph
|
||||
- gnocchi-install
|
||||
vars:
|
||||
openstack_service_system_user: "{{ gnocchi_system_user_name }}"
|
||||
openstack_service_venv_bin: "{{ gnocchi_bin }}"
|
||||
when:
|
||||
- gnocchi_storage_driver == 'ceph'
|
||||
- not gnocchi_identity_only | bool
|
||||
tags:
|
||||
- gnocchi-install
|
||||
- always
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
|
Loading…
Reference in New Issue