mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2026-08-09 15:33:18 +02:00
87ea8160c1
- Retry transient k3s release downloads with bounded backoff.\n- Bound failure diagnostics and validate guest release connectivity.\n- Discover repository-owned Molecule state under the actual project root.
47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
---
|
|
- name: Download k3s binary x64
|
|
ansible.builtin.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: /usr/local/bin/k3s
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
register: k3s_download_x64
|
|
retries: 5
|
|
delay: 10
|
|
until: k3s_download_x64 is succeeded
|
|
when: ansible_facts.architecture == "x86_64"
|
|
|
|
- name: Download k3s binary arm64
|
|
ansible.builtin.get_url:
|
|
url: https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/k3s-arm64
|
|
checksum: sha256:https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/sha256sum-arm64.txt
|
|
dest: /usr/local/bin/k3s
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
register: k3s_download_arm64
|
|
retries: 5
|
|
delay: 10
|
|
until: k3s_download_arm64 is succeeded
|
|
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
|
|
ansible.builtin.get_url:
|
|
url: https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/k3s-armhf
|
|
checksum: sha256:https://github.com/k3s-io/k3s/releases/download/{{ k3s_version }}/sha256sum-arm.txt
|
|
dest: /usr/local/bin/k3s
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
register: k3s_download_armhf
|
|
retries: 5
|
|
delay: 10
|
|
until: k3s_download_armhf is succeeded
|
|
when:
|
|
- ansible_facts.architecture is search("arm")
|
|
- ansible_facts.userspace_bits == "32"
|