fix: helm unpack
This commit is contained in:
@@ -5,11 +5,28 @@
|
|||||||
dest: "/tmp/helm-{{ k3s_helm_version }}.tar.gz"
|
dest: "/tmp/helm-{{ k3s_helm_version }}.tar.gz"
|
||||||
when: ansible_facts.architecture == "x86_64"
|
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:
|
unarchive:
|
||||||
src: "/tmp/helm-{{ k3s_helm_version }}.tar.gz"
|
src: "/tmp/helm-{{ k3s_helm_version }}.tar.gz"
|
||||||
dest: "{{ k3s_binary_dir }}/helm"
|
dest: "{{ helm_unpack_directory.path }}"
|
||||||
owner: root
|
|
||||||
group: "root"
|
- name: Move Helm to the desired installation directory
|
||||||
mode: 0750
|
copy:
|
||||||
remote_src: true
|
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