24 lines
632 B
YAML
24 lines
632 B
YAML
---
|
|
- name: Create temporary file
|
|
ansible.builtin.tempfile:
|
|
state: file
|
|
suffix: temp
|
|
register: k3s_binary_tmp
|
|
delegate_to: localhost
|
|
run_once: true
|
|
|
|
- name: Download k3s binary
|
|
get_url:
|
|
url: https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/k3s
|
|
checksum: sha256:https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/sha256sum-amd64.txt
|
|
dest: "{{ k3s_binary_tmp.path }}"
|
|
delegate_to: localhost
|
|
run_once: true
|
|
|
|
- name: Copy k3s binary
|
|
ansible.builtin.copy:
|
|
src: "{{ k3s_binary_tmp.path }}"
|
|
dest: /usr/local/bin/k3s
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|