initial pfannkuchen
This commit is contained in:
parent
b6dafc7a73
commit
4d305fa19f
99 changed files with 3575 additions and 321 deletions
3
roles/pve_gpu_passthrough/handlers/main.yml
Normal file
3
roles/pve_gpu_passthrough/handlers/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: Update GRUB
|
||||
command: update-grub
|
||||
45
roles/pve_gpu_passthrough/tasks/main.yml
Normal file
45
roles/pve_gpu_passthrough/tasks/main.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
- name: IOMMU Kernel-Parameter setzen (GRUB)
|
||||
lineinfile:
|
||||
path: /etc/default/grub
|
||||
regexp: '^GRUB_CMDLINE_LINUX_DEFAULT='
|
||||
line: 'GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt"'
|
||||
register: grub_updated
|
||||
notify: Update GRUB
|
||||
|
||||
- name: VFIO Module in /etc/modules eintragen
|
||||
copy:
|
||||
dest: /etc/modules
|
||||
content: |
|
||||
# /etc/modules - VFIO fuer GPU Passthrough
|
||||
vfio
|
||||
vfio_iommu_type1
|
||||
vfio_pci
|
||||
mode: "0644"
|
||||
register: modules_updated
|
||||
|
||||
- name: Alte fehlerhafte modprobe Configs aufraeumen
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- /etc/modprobe.d/block-nouveau.conf
|
||||
- /etc/modprobe.d/nvidia-installer-disable-nouveau.conf
|
||||
|
||||
- name: NVIDIA und Nouveau auf Host blacklisten
|
||||
copy:
|
||||
dest: /etc/modprobe.d/gpu-passthrough.conf
|
||||
content: |
|
||||
blacklist nouveau
|
||||
blacklist nvidia
|
||||
blacklist nvidiafb
|
||||
blacklist rivafb
|
||||
options nouveau modeset=0
|
||||
softdep nvidia pre: vfio-pci
|
||||
softdep nouveau pre: vfio-pci
|
||||
mode: "0644"
|
||||
register: modprobe_updated
|
||||
|
||||
- name: initramfs aktualisieren
|
||||
command: update-initramfs -u -k all
|
||||
when: grub_updated.changed or modules_updated.changed or modprobe_updated.changed
|
||||
Loading…
Add table
Add a link
Reference in a new issue