fix: helm unpack
This commit is contained in:
@@ -5,11 +5,28 @@
|
||||
dest: "/tmp/helm-{{ k3s_helm_version }}.tar.gz"
|
||||
when: ansible_facts.architecture == "x86_64"
|
||||
|
||||
- name: extract binary
|
||||
- name: Create a directory to unpack Helm
|
||||
tempfile:
|
||||
state: directory
|
||||
register: helm_unpack_directory
|
||||
|
||||
- name: Unpack Helm tarball
|
||||
unarchive:
|
||||
src: "/tmp/helm-{{ k3s_helm_version }}.tar.gz"
|
||||
dest: "{{ k3s_binary_dir }}/helm"
|
||||
owner: root
|
||||
group: "root"
|
||||
mode: 0750
|
||||
remote_src: true
|
||||
dest: "{{ helm_unpack_directory.path }}"
|
||||
|
||||
- name: Move Helm to the desired installation directory
|
||||
copy:
|
||||
src: "{{ helm_unpack_directory.path }}/linux-amd64/helm"
|
||||
dest: "{{ helm_install_directory }}/helm"
|
||||
remote_src: yes
|
||||
mode: '0755'
|
||||
when: ansible_facts.architecture == "x86_64"
|
||||
|
||||
- name: Clean up downloaded and unpacked files
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- "/tmp/helm-{{ k3s_helm_version }}.tar.gz"
|
||||
- "{{ helm_unpack_directory.path }}"
|
||||
|
||||
Reference in New Issue
Block a user