1 # Copyright 2020 Huawei Technologies Co., Ltd.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 - name: check whether helm is already installed
23 msg: helm is already present
24 when: result.stdout != ""
27 # yamllint disable rule:line-length
28 msg: Ignore Uninstall Log , Helm not installed continue with Installation
29 # yamllint disable rule:line-length
30 when: result.stdout == ""
32 - name: "INSTALL: Helm download command on x86_64"
33 command: wget https://get.helm.sh/helm-v3.0.2-linux-amd64.tar.gz
34 when: result is failed and ansible_architecture == 'x86_64'
36 - name: "INSTALL: Untar helm on x86_64"
37 command: tar -zxvf helm-v3.0.2-linux-amd64.tar.gz
38 when: result is failed and ansible_architecture == 'x86_64'
40 - name: "INSTALL: Helm move to bin folder on x86_64"
41 command: mv linux-amd64/helm /usr/local/bin/
42 when: result is failed and ansible_architecture == 'x86_64'
44 - name: "INSTALL: Helm download command on aarch64"
45 command: wget https://get.helm.sh/helm-v3.0.2-linux-arm64.tar.gz
46 when: result is failed and ansible_architecture == 'aarch64'
48 - name: "INSTALL: Untar helm on aarch64"
49 command: tar -zxvf helm-v3.0.2-linux-arm64.tar.gz
50 when: result is failed and ansible_architecture == 'aarch64'
52 - name: "INSTALL: Helm move to bin folder on aarch64"
53 command: mv linux-arm64/helm /usr/local/bin/
54 when: result is failed and ansible_architecture == 'aarch64'
56 - name: "INSTALL: Add helm repo"
57 # yamllint disable rule:line-length
58 command: helm repo add stable https://charts.helm.sh/stable
59 # yamllint disable rule:line-length
60 when: result is failed
62 - name: "INSTALL: Updated helm repo"
63 command: helm repo update
64 when: result is failed
66 - name: "INSTALLED List helm repo"
67 command: helm repo list
68 when: result is failed