30 lines
1.1 KiB
YAML
30 lines
1.1 KiB
YAML
- name: Download amd64 k3s binary
|
|
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
|
|
notify: reboot
|
|
|
|
# Begin nvidia
|
|
# https://dev.to/mweibel/add-nvidia-gpu-support-to-k3s-with-containerd-4j17
|
|
- name: Download nvidia repository gpg key
|
|
get_url:
|
|
url: https://nvidia.github.io/libnvidia-container/gpgkey
|
|
dest: /usr/share/keyrings/nvidia-container-toolkit-keyring.asc
|
|
|
|
- name: Add nvidia repository
|
|
apt_repository:
|
|
repo: deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.asc] https://nvidia.github.io/libnvidia-container/stable/deb/$(ARCH) /
|
|
|
|
- name: Install nvidia drivers and nvidia container toolkit
|
|
apt:
|
|
update_cache: true
|
|
name:
|
|
- linux-modules-nvidia-{{ nvidia_driver_branch }}-server-generic
|
|
- nvidia-utils-{{ nvidia_driver_branch }}-server
|
|
- nvidia-container-toolkit
|
|
notify: reboot
|
|
# End nvidia |