refactor: yml -> yaml
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
39
roles/proxmox/tasks/06_hardware_acceleration.yaml
Normal file
39
roles/proxmox/tasks/06_hardware_acceleration.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
- name: Set GRUB_CMDLINE_LINUX_DEFAULT for PCI passthrough
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/grub
|
||||
regexp: "^GRUB_CMDLINE_LINUX_DEFAULT="
|
||||
line: >
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt
|
||||
pcie_acs_override=downstream,multifunction initcall_blacklist=sysfb_init
|
||||
video=simplefb:off video=vesafb:off video=efifb:off video=vesa:off
|
||||
disable_vga=1 vfio_iommu_type1.allow_unsafe_interrupts=1 kvm.ignore_msrs=1
|
||||
modprobe.blacklist=radeon,nouveau,nvidia,nvidiafb,nvidia-gpu,snd_hda_intel,snd_hda_codec_hdmi,i915"
|
||||
backup: true
|
||||
register: iommu_result
|
||||
|
||||
- name: Ensure VFIO modules are listed in /etc/modules
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/modules
|
||||
marker: "# {mark} VFIO Modules"
|
||||
block: |
|
||||
vfio
|
||||
vfio_iommu_type1
|
||||
vfio_pci
|
||||
vfio_virqfd
|
||||
create: true
|
||||
backup: true
|
||||
mode: 644
|
||||
register: vfio_result
|
||||
|
||||
- name: Update initramfs
|
||||
ansible.builtin.command: update-initramfs -u -k all
|
||||
when: iommu_result.changed or vfio_result.changed
|
||||
# notify:
|
||||
# - Reboot Node
|
||||
|
||||
- name: Update grub configuration
|
||||
ansible.builtin.command: update-grub
|
||||
when: iommu_result.changed or vfio_result.changed
|
||||
# notify:
|
||||
# - Reboot Node
|
||||
Reference in New Issue
Block a user