mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Use checksum with get_url
When the checksum is used there is no need to delete the binary first, as it will be compared to the checksum and downloaded and replaced only as needed.
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
---
|
||||
|
||||
- name: Delete k3s if already present
|
||||
file:
|
||||
path: /usr/local/bin/k3s
|
||||
state: absent
|
||||
|
||||
- name: Download k3s binary x64
|
||||
get_url:
|
||||
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s
|
||||
checksum: sha256:https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/sha256sum-amd64.txt
|
||||
dest: /usr/local/bin/k3s
|
||||
owner: root
|
||||
group: root
|
||||
@@ -17,6 +13,7 @@
|
||||
- name: Download k3s binary arm64
|
||||
get_url:
|
||||
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s-arm64
|
||||
checksum: sha256:https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/sha256sum-arm64.txt
|
||||
dest: /usr/local/bin/k3s
|
||||
owner: root
|
||||
group: root
|
||||
@@ -29,6 +26,7 @@
|
||||
- name: Download k3s binary armhf
|
||||
get_url:
|
||||
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s-armhf
|
||||
checksum: sha256:https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/sha256sum-arm.txt
|
||||
dest: /usr/local/bin/k3s
|
||||
owner: root
|
||||
group: root
|
||||
|
||||
Reference in New Issue
Block a user