2019-04-26 21:10:27 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Delete k3s if already present
|
|
|
|
file:
|
|
|
|
path: /usr/local/bin/k3s
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
- name: Download k3s binary x64
|
2019-05-30 11:05:35 +02:00
|
|
|
get_url:
|
2020-05-12 22:17:06 +02:00
|
|
|
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s
|
|
|
|
dest: /usr/local/bin/k3s
|
|
|
|
owner: root
|
|
|
|
group: root
|
2020-05-17 05:27:08 +02:00
|
|
|
mode: 0755
|
2020-05-12 22:17:06 +02:00
|
|
|
when: ansible_facts.architecture == "x86_64"
|
2019-04-26 21:10:27 +02:00
|
|
|
|
|
|
|
- name: Download k3s binary arm64
|
2019-05-30 11:05:35 +02:00
|
|
|
get_url:
|
2020-05-12 22:17:06 +02:00
|
|
|
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s-arm64
|
|
|
|
dest: /usr/local/bin/k3s
|
|
|
|
owner: root
|
|
|
|
group: root
|
2020-05-17 05:27:08 +02:00
|
|
|
mode: 0755
|
2020-05-12 22:17:06 +02:00
|
|
|
when:
|
2020-05-30 18:54:34 +02:00
|
|
|
- ( ansible_facts.architecture is search("arm") and
|
|
|
|
ansible_facts.userspace_bits == "64" ) or
|
|
|
|
ansible_facts.architecture is search("aarch64")
|
2019-04-26 21:10:27 +02:00
|
|
|
|
|
|
|
- name: Download k3s binary armhf
|
2019-05-30 11:05:35 +02:00
|
|
|
get_url:
|
2020-05-12 22:17:06 +02:00
|
|
|
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s-armhf
|
|
|
|
dest: /usr/local/bin/k3s
|
|
|
|
owner: root
|
|
|
|
group: root
|
2020-05-17 05:27:08 +02:00
|
|
|
mode: 0755
|
2020-05-12 22:17:06 +02:00
|
|
|
when:
|
|
|
|
- ansible_facts.architecture is search("arm")
|
|
|
|
- ansible_facts.userspace_bits == "32"
|