diff options
author | 2021-02-01 10:48:54 +0100 | |
---|---|---|
committer | 2021-02-04 11:51:46 +0100 | |
commit | b07d4a22dfd4fe24376de514019ca2a32e358b4b (patch) | |
tree | 1c89c875032758a6e27bb5c705b8a8a21ade342f /ansible/roles/helm/tasks/main.yml | |
parent | 007a4bdfef2e398d9141cc903927bae03ea4bc7a (diff) |
Add test scenario for Helm v3
Change-Id: Iad5478f70533719e1076f3961613fddffb14eebd
Issue-ID: OOM-2665
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'ansible/roles/helm/tasks/main.yml')
-rw-r--r-- | ansible/roles/helm/tasks/main.yml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ansible/roles/helm/tasks/main.yml b/ansible/roles/helm/tasks/main.yml index c1b47103..64db7850 100644 --- a/ansible/roles/helm/tasks/main.yml +++ b/ansible/roles/helm/tasks/main.yml @@ -9,3 +9,32 @@ - '*/helm' remote_src: true mode: 0755 + +- name: Install helm-push plugin if runing with Helm v3 + block: + - name: Get helm environment information + command: "{{ helm_bin_dir }}/helm env" + register: helm_env + changed_when: false # for idempotency + + - name: Set helm plugin dir fact + set_fact: + helm_plugin_dir: + "{% if 'HELM_PLUGINS' in helm_env.stdout -%} + {{ (helm_env.stdout | replace('\"', '') | regex_search('HELM_PLUGINS.*')).split('=')[1] }} + {%- else -%} + {{ '~/.local/share/helm/plugins' }} + {%- endif %}" + + - name: Ensure that plugin directory exists + file: + path: "{{ helm_plugin_dir }}/helm-push" + state: directory + mode: 0755 + + - name: Deploy helm-push plugin + unarchive: + src: "{{ app_data_path }}/downloads/helm-push_{{ helm3_push_version }}_linux_amd64.tar.gz" + dest: "{{ helm_plugin_dir }}/helm-push" + remote_src: true + when: helm_version | regex_search("^v3" ) |