2 # file: roles/aws/tasks/main.yaml
4 - name: Edit repositories
5 include_tasks: "{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml"
9 - name: Get vfio-pci With WC Patcher
11 url: "https://github.com/amzn/amzn-drivers/raw/master/userspace/dpdk/enav2-vfio-patch/get-vfio-with-wc.sh"
12 dest: "/opt/get-vfio-with-wc.sh"
17 - name: Create vfio-pci Patch Directory
24 - name: Get vfio-pci WC Patch
26 url: "https://github.com/amzn/amzn-drivers/raw/master/userspace/dpdk/enav2-vfio-patch/patches/linux-4.10-vfio-wc.patch"
27 dest: "/opt/patches/linux-4.10-vfio-wc.patch"
32 - name: Compile vfio-pci With WC Patch
33 shell: "/bin/bash /opt/get-vfio-with-wc.sh"
37 - name: Load Kernel Modules By Default
48 - name: Add Kernel Modules Options (igb_uio)
50 path: "/etc/modprobe.d/igb_uio.conf"
55 - "options igb_uio wc_activate=1"
59 - name: Add Kernel Modules Options (vfio-pci)
61 path: "/etc/modprobe.d/vfio-noiommu.conf"
66 - "options vfio enable_unsafe_noiommu_mode=1"
70 - name: Reload systemd-modules
72 name: "systemd-modules-load"
75 - reload-systemd-modules
77 - name: Performance Tuning - Adjust nr_hugepages
79 name: "vm.nr_hugepages"
82 sysctl_file: "/etc/sysctl.d/90-csit.conf"