1 # Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved.
\r
3 # Licensed under the Apache License, Version 2.0 (the "License");
\r
4 # you may not use this file except in compliance with the License.
\r
5 # You may obtain a copy of the License at
\r
7 # http://www.apache.org/licenses/LICENSE-2.0
\r
9 # Unless required by applicable law or agreed to in writing, software
\r
10 # distributed under the License is distributed on an "AS IS" BASIS,
\r
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
12 # See the License for the specific language governing permissions and
\r
13 # limitations under the License.
\r
16 - name: set script dir permissions
\r
24 - name: check ansible version
\r
27 - bash ./script/check_ansible_version.sh
\r
30 - name: run the equivalent of "apt-get update" as a separate step
\r
34 - name: install make, gcc and pip external packages
\r
43 - name: create opensds work directory if it doesn't exist
\r
49 - "{{ opensds_work_dir }}"
\r
50 - "{{ opensds_config_dir }}"
\r
51 - "{{ opensds_driver_config_dir }}"
\r
52 - "{{ opensds_log_dir }}"
\r
54 - name: include scenarios/repository.yml when installing from repository
\r
55 include: scenarios/repository.yml
\r
56 when: install_from == "repository"
\r
58 - name: include scenarios/release.yml when installing from release
\r
59 include: scenarios/release.yml
\r
60 when: install_from == "release"
\r
62 - name: include scenarios/container.yml when installing from container
\r
63 include: scenarios/container.yml
\r
64 when: install_from == "container"
\r
66 - name: copy config templates into opensds global config folder
\r
68 src: ../../../../conf/
\r
69 dest: "{{ opensds_config_dir }}"
\r
71 - name: configure opensds global info
\r
73 cat > opensds.conf <<OPENSDS_GLOABL_CONFIG_DOC
\r
75 api_endpoint = {{ controller_endpoint }}
\r
77 log_file = {{ controller_log_file }}
\r
79 auth_strategy = {{ opensds_auth_strategy }}
\r
82 api_endpoint = {{ dock_endpoint }}
\r
83 log_file = {{ dock_log_file }}
\r
84 # Choose the type of dock resource, only support 'provisioner' and 'attacher'.
\r
85 dock_type = {{ dock_type }}
\r
86 # Specify which backends should be enabled, sample,ceph,cinder,lvm and so on.
\r
87 enabled_backends = {{ enabled_backend }}
\r
90 endpoint = {{ db_endpoint }}
\r
91 driver = {{ db_driver }}
\r
93 chdir: "{{ opensds_config_dir }}"
\r
96 - name: include nbp-installer role if nbp_plugin_type != hotpot_only
\r
99 when: nbp_plugin_type != "hotpot_only"
\r