mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2024-10-02 04:37:31 +02:00
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
---
|
|
|
|
- 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
|
|
dest: /usr/local/bin/k3s
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
when: ansible_facts.architecture == "x86_64"
|
|
|
|
- name: Download k3s binary arm64
|
|
get_url:
|
|
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s-arm64
|
|
dest: /usr/local/bin/k3s
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
when:
|
|
- ( ansible_facts.architecture is search("arm") and
|
|
ansible_facts.userspace_bits == "64" ) or
|
|
ansible_facts.architecture is search("aarch64")
|
|
|
|
- name: Download k3s binary armhf
|
|
get_url:
|
|
url: https://github.com/rancher/k3s/releases/download/{{ k3s_version }}/k3s-armhf
|
|
dest: /usr/local/bin/k3s
|
|
owner: root
|
|
group: root
|
|
mode: 0755
|
|
when:
|
|
- ansible_facts.architecture is search("arm")
|
|
- ansible_facts.userspace_bits == "32"
|