2019-04-26 19:10:27 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Delete k3s if already present
|
|
|
|
file:
|
|
|
|
path: /usr/local/bin/k3s
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
- name: Download k3s binary x64
|
2019-05-30 09:05:35 +00:00
|
|
|
get_url:
|
2019-04-26 19:10:27 +00:00
|
|
|
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s
|
|
|
|
dest: /usr/local/bin/k3s
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 755
|
|
|
|
# when: ( ansible_facts.userspace_architecture == "x86_64" )
|
|
|
|
when: ( ansible_facts.architecture == "x86_64" )
|
|
|
|
|
|
|
|
- name: Download k3s binary arm64
|
2019-05-30 09:05:35 +00:00
|
|
|
get_url:
|
2019-04-26 19:10:27 +00:00
|
|
|
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s-arm64
|
|
|
|
dest: /usr/local/bin/k3s
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 755
|
2019-05-30 09:05:35 +00:00
|
|
|
when: ( ansible_facts.architecture is search("arm") )
|
|
|
|
and
|
|
|
|
( ansible_facts.userspace_bits == "64" )
|
2019-04-26 19:10:27 +00:00
|
|
|
|
|
|
|
- name: Download k3s binary armhf
|
2019-05-30 09:05:35 +00:00
|
|
|
get_url:
|
2019-04-26 19:10:27 +00:00
|
|
|
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s-armhf
|
|
|
|
dest: /usr/local/bin/k3s
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 755
|
2019-05-30 09:05:35 +00:00
|
|
|
when: ( ansible_facts.architecture is search("arm") )
|
|
|
|
and
|
|
|
|
( ansible_facts.userspace_bits == "32" )
|