Loading roles/download/tasks/main.yml +10 −31 Original line number Diff line number Diff line --- - name: Download k3s binary x64 - name: Download k3s install script 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 url: https://get.k3s.io/ timeout: 120 dest: /usr/local/bin/k3s dest: /usr/local/bin/k3s-install.sh owner: root group: root mode: 0755 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 timeout: 120 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 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 timeout: 120 dest: /usr/local/bin/k3s owner: root group: root mode: 0755 when: - ansible_facts.architecture is search("arm") - ansible_facts.userspace_bits == "32" - name: Download k3s binary ansible.builtin.command: cmd: /usr/local/bin/k3s-install.sh environment: INSTALL_K3S_SKIP_START: "true" INSTALL_K3S_VERSION: "{{ k3s_version }}" changed_when: true Loading
roles/download/tasks/main.yml +10 −31 Original line number Diff line number Diff line --- - name: Download k3s binary x64 - name: Download k3s install script 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 url: https://get.k3s.io/ timeout: 120 dest: /usr/local/bin/k3s dest: /usr/local/bin/k3s-install.sh owner: root group: root mode: 0755 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 timeout: 120 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 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 timeout: 120 dest: /usr/local/bin/k3s owner: root group: root mode: 0755 when: - ansible_facts.architecture is search("arm") - ansible_facts.userspace_bits == "32" - name: Download k3s binary ansible.builtin.command: cmd: /usr/local/bin/k3s-install.sh environment: INSTALL_K3S_SKIP_START: "true" INSTALL_K3S_VERSION: "{{ k3s_version }}" changed_when: true