# Copyright (c) 2018 Huawei Technologies Co., Ltd. All Rights Reserved. # # 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: set script dir permissions file: path: ./script mode: 0755 recurse: yes ignore_errors: yes become: yes - name: check ansible version shell: "{{ item }}" with_items: - bash ./script/check_ansible_version.sh become: yes - name: run the equivalent of "apt-get update" as a separate step apt: update_cache: yes - name: install make, gcc and pip external packages apt: name: "{{ item }}" state: present with_items: - make - gcc - python-pip - name: create opensds work directory if it doesn't exist file: path: "{{ item }}" state: directory mode: 0755 with_items: - "{{ opensds_work_dir }}" - "{{ opensds_config_dir }}" - "{{ opensds_driver_config_dir }}" - "{{ opensds_log_dir }}" - name: include scenarios/repository.yml when installing from repository include: scenarios/repository.yml when: install_from == "repository" - name: include scenarios/release.yml when installing from release include: scenarios/release.yml when: install_from == "release" - name: include scenarios/container.yml when installing from container include: scenarios/container.yml when: install_from == "container" - name: copy config templates into opensds global config folder copy: src: ../../../../conf/ dest: "{{ opensds_config_dir }}" - name: configure opensds global info shell: | cat > opensds.conf <