# # Copyright 2020 Huawei Technologies Co., Ltd. # # 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: check if openebs is already installed shell: cmd: kubectl get pods -n openebs register: result ignore_errors: yes no_log: True - debug: msg: openebs already installed when: result.stdout != "" - debug: # yamllint disable rule:line-length msg: Ignore Uninstall Log , Openebs not installed continue with Installation # yamllint disable rule:line-length when: result.stdout == "" - name: "INSTALL: create namespace for openebs" shell: cmd: kubectl create ns openebs ignore_errors: yes no_log: True when: result.stdout == "" - name: "INSTALL: add helm repo for openebs" shell: cmd: helm repo add openebs https://openebs.github.io/charts ignore_errors: yes no_log: True when: result.stdout == "" - name: "INSTALL: update helm repo" shell: cmd: helm repo update ignore_errors: yes no_log: True when: result.stdout == "" - name: "INSTALL: install openebs" shell: cmd: helm install openebs --namespace openebs openebs/openebs ignore_errors: yes no_log: True when: result.stdout == ""