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 system packages
\r
43 - name: install Red Hat system packages
\r
50 when: ansible_os_family == "RedHat"
\r
52 - name: install Ubuntu system packages
\r
59 when: ansible_os_family == "Debian"
\r
61 - name: create opensds work directory if it doesn't exist
\r
67 - "{{ opensds_work_dir }}"
\r
68 - "{{ opensds_config_dir }}"
\r
69 - "{{ opensds_driver_config_dir }}"
\r
70 - "{{ opensds_log_dir }}"
\r
72 - name: include scenarios/repository.yml when installing from repository
\r
73 include: scenarios/repository.yml
\r
74 when: install_from == "repository"
\r
76 - name: include scenarios/release.yml when installing from release
\r
77 include: scenarios/release.yml
\r
78 when: install_from == "release"
\r
80 - name: include scenarios/container.yml when installing from container
\r
81 include: scenarios/container.yml
\r
82 when: install_from == "container"
\r
84 - name: copy config templates into opensds global config folder
\r
86 src: ../../../../conf/
\r
87 dest: "{{ opensds_config_dir }}"
\r
89 - name: configure opensds global info
\r
91 cat > opensds.conf <<OPENSDS_GLOABL_CONFIG_DOC
\r
93 api_endpoint = {{ controller_endpoint }}
\r
95 log_file = {{ controller_log_file }}
\r
97 auth_strategy = {{ opensds_auth_strategy }}
\r
100 api_endpoint = {{ dock_endpoint }}
\r
101 log_file = {{ dock_log_file }}
\r
102 # Choose the type of dock resource, only support 'provisioner' and 'attacher'.
\r
103 dock_type = {{ dock_type }}
\r
104 # Specify which backends should be enabled, sample,ceph,cinder,lvm and so on.
\r
105 enabled_backends = {{ enabled_backend }}
\r
108 endpoint = {{ db_endpoint }}
\r
109 driver = {{ db_driver }}
\r
111 chdir: "{{ opensds_config_dir }}"
\r
114 - name: include nbp-installer role if nbp_plugin_type != hotpot_only
\r
116 name: nbp-installer
\r
117 when: nbp_plugin_type != "hotpot_only"
\r