1
0
Fork 0
home-stack-ansible/roles/k3s/tasks/vm.yml

30 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2021-12-28 04:01:35 +00:00
- 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
2024-08-07 04:49:54 +00:00
# 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