This commit is contained in:
2024-07-19 22:06:03 -04:00
parent abd86e10e6
commit 76f0489016
54 changed files with 998 additions and 438 deletions

View File

@@ -0,0 +1,31 @@
---
- name: Check if Helm binary exists.
stat:
path: "{{ helm_bin_path }}"
register: helm_check
- name: Check Helm version.
command: "{{ helm_bin_path }} version"
failed_when: false
changed_when: false
register: helm_existing_version
- name: Download helm.
unarchive:
src: "{{ helm_repo_path }}/helm-{{ helm_version }}-{{ helm_platform }}-{{ helm_arch }}.tar.gz"
dest: /tmp
remote_src: true
mode: 0755
register: helm_download
when: >
not helm_check.stat.exists
or helm_version not in helm_existing_version.stdout
- name: Copy helm binary into place.
copy:
src: "/tmp/{{ helm_platform }}-{{ helm_arch }}/helm"
dest: "{{ helm_bin_path }}"
mode: 0755
remote_src: true
become: true
when: helm_download is changed