26 lines
554 B
YAML
26 lines
554 B
YAML
|
---
|
||
|
- name: check k3s version
|
||
|
shell:
|
||
|
cmd: "k3s --version | grep k3s | cut -d' ' -f3"
|
||
|
args:
|
||
|
executable: /bin/bash
|
||
|
changed_when: False
|
||
|
register: installed_k3s_version
|
||
|
check_mode: False
|
||
|
|
||
|
- name: get k3s
|
||
|
get_url:
|
||
|
url: "https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/k3s-arm64"
|
||
|
dest: /usr/local/bin/k3s
|
||
|
mode: 0755
|
||
|
owner: root
|
||
|
group: root
|
||
|
when: installed_k3s_version.stdout != k3s_version
|
||
|
|
||
|
- name: link k3s
|
||
|
file:
|
||
|
src: /usr/local/bin/k3s
|
||
|
dest: /usr/local/bin/kubernetes
|
||
|
state: link
|
||
|
...
|