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 >=4.10
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: Get vfio-pci WC Patch >=5.8
34 url: "https://github.com/amzn/amzn-drivers/raw/master/userspace/dpdk/enav2-vfio-patch/patches/linux-5.8-vfio-wc.patch"
35 dest: "/opt/patches/linux-5.8-vfio-wc.patch"
40 - name: Compile vfio-pci With WC Patch
41 shell: "/bin/bash /opt/get-vfio-with-wc.sh"
45 - name: Load Kernel Modules By Default
54 - aws-load-kernel-modules
56 - name: Add Kernel Modules Options (igb_uio)
58 path: "/etc/modprobe.d/igb_uio.conf"
63 - "options igb_uio wc_activate=1"
65 - aws-load-kernel-modules
67 - name: Add Kernel Modules Options (vfio-pci)
69 path: "/etc/modprobe.d/vfio-noiommu.conf"
74 - "options vfio enable_unsafe_noiommu_mode=1"
76 - aws-load-kernel-modules
78 - name: Reload systemd-modules
80 name: "systemd-modules-load"
83 - aws-reload-systemd-modules
85 - name: Performance Tuning - Adjust nr_hugepages
87 name: "vm.nr_hugepages"
90 sysctl_file: "/etc/sysctl.d/90-csit.conf"