+# Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved.\r
+#\r
+# Licensed under the Apache License, Version 2.0 (the "License");\r
+# you may not use this file except in compliance with the License.\r
+# You may obtain a copy of the License at\r
+#\r
+# http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+# Unless required by applicable law or agreed to in writing, software\r
+# distributed under the License is distributed on an "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+# See the License for the specific language governing permissions and\r
+# limitations under the License.\r
+\r
---\r
-- name: copy opensds cinder backend file if specify cinder backend\r
+- name: configure cinder section in opensds global info if specify cinder backend\r
+ shell: |\r
+ cat >> opensds.conf <<OPENSDS_GLOABL_CONFIG_DOC\r
+\r
+ [cinder]\r
+ name = {{ cinder_name }}\r
+ description = {{ cinder_description }}\r
+ driver_name = {{ cinder_driver_name }}\r
+ config_path = {{ cinder_config_path }}\r
+ args:\r
+ chdir: "{{ opensds_config_dir }}"\r
+ ignore_errors: yes\r
+\r
+- name: copy opensds cinder backend file to cinder config path if specify cinder backend\r
copy:\r
src: ../../../group_vars/cinder/cinder.yaml\r
dest: "{{ cinder_config_path }}"\r