summaryrefslogtreecommitdiffstats
path: root/ansible/test/roles/prepare-helm/tasks/main.yml
blob: c1d25de09ac2929bd88c7edc702ae4f5e3eb9bfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
- name: "Ensure {{ app_data_path }}/downloads directory exists"
  file:
    path: "{{ app_data_path }}/downloads"
    recurse: true
    state: directory

- name: "Download helm-{{ helm_version }}"
  get_url:
    url: "https://get.helm.sh/helm-{{ helm_version }}-linux-amd64.tar.gz"
    dest: "{{ app_data_path }}/downloads"

- name: Download Helm v3 helm-push plugin
  command: "curl --connect-timeout 10 -L https://github.com/chartmuseum/helm-push/releases/download/v{{ helm3_push_version }}/helm-push_{{ helm3_push_version }}_linux_amd64.tar.gz -o {{ app_data_path }}/downloads/helm-push_{{ helm3_push_version }}_linux_amd64.tar.gz"
  register: result
  retries: 10
  delay: 1
  until: not result.failed
  args:
    warn: false
  when: helm_version | regex_search("^v3" )