X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=fdio.infra.ansible%2Froles%2Faws%2Ftasks%2Fmain.yaml;h=b5132c1909bc2d48131c7ade056fe16c78a1306b;hb=HEAD;hp=e2256880c0ef7f18088892925fc7a37b325dd545;hpb=7566d9fe1ff86a7dab3de09f9477e50d60a12dfc;p=csit.git diff --git a/fdio.infra.ansible/roles/aws/tasks/main.yaml b/fdio.infra.ansible/roles/aws/tasks/main.yaml index e2256880c0..b33848e2d2 100644 --- a/fdio.infra.ansible/roles/aws/tasks/main.yaml +++ b/fdio.infra.ansible/roles/aws/tasks/main.yaml @@ -1,5 +1,5 @@ --- -# file: roles/aws/tasks/main.yaml +# file: tasks/main.yaml - name: Edit repositories include_tasks: "{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml" @@ -13,18 +13,6 @@ tags: - aws-inst-prerequisites -- name: Switch Kernel At Boot - ansible.builtin.lineinfile: - path: "/etc/default/grub" - state: "present" - line: "GRUB_DEFAULT=\"1>2\"" - notify: - - "Update GRUB" - tags: - - perf-conf-grub - -- meta: flush_handlers - - name: Load Kernel Modules By Default ansible.builtin.lineinfile: path: "/etc/modules" @@ -33,8 +21,6 @@ with_items: - "igb_uio" - "vfio-pci" - notify: - - "Reboot Server" tags: - aws-load-kernel-modules @@ -46,8 +32,6 @@ create: "yes" with_items: - "options igb_uio wc_activate=1" - notify: - - "Reboot Server" tags: - aws-load-kernel-modules @@ -59,13 +43,39 @@ create: "yes" with_items: - "options vfio enable_unsafe_noiommu_mode=1" - notify: - - "Reboot Server" tags: - aws-load-kernel-modules +- name: Kernel Parameters + ansible.builtin.lineinfile: + path: "/etc/default/grub" + state: "present" + regexp: "^GRUB_CMDLINE_LINUX=" + line: "GRUB_CMDLINE_LINUX=iommu=1 intel_iommu=on" + notify: + - "Update GRUB" + tags: + - perf-conf-grub + - meta: flush_handlers +- name: Disable Password Login + ansible.builtin.lineinfile: + dest: "/etc/ssh/sshd_config" + regexp: "^PasswordAuthentication yes" + line: "PasswordAuthentication no" + notify: + - "Restart SSHd" + tags: + - conf-ssh + +- name: Recursively Delete Other Configs + ansible.builtin.file: + path: "/etc/ssh/sshd_config.d" + state: "absent" + tags: + - conf-ssh + #- name: Get vfio-pci With WC Patcher # ansible.builtin.get_url: # url: "https://github.com/amzn/amzn-drivers/raw/master/userspace/dpdk/enav2-vfio-patch/get-vfio-with-wc.sh" @@ -73,48 +83,41 @@ # mode: 0744 # tags: # - aws-vfio-patch - -- name: Create vfio-pci Patch Directory - ansible.builtin.file: - path: "/opt/patches/" - state: "directory" - tags: - - aws-vfio-patch - -- name: Get vfio-pci WC Patch - ansible.builtin.get_url: - url: "https://github.com/amzn/amzn-drivers/raw/master/userspace/dpdk/enav2-vfio-patch/patches/{{ item }}" - dest: "/opt/patches/{{ item }}" - mode: 0744 - with_items: - - "linux-4.10-vfio-wc.patch" - - "linux-5.8-vfio-wc.patch" - - "linux-5.15-vfio-wc.patch" - tags: - - aws-vfio-patch - -- name: Copy vfio-pci WC Patch - ansible.builtin.copy: - src: "files/get-vfio-with-wc.sh" - dest: "/opt" - mode: 0744 - tags: - - aws-vfio-patch - -- name: Compile vfio-pci With WC Patch - ansible.builtin.shell: "/bin/bash /opt/get-vfio-with-wc.sh" - environment: - DEBIAN_FRONTEND: "noninteractive" - TERM: "vt100" - tags: - - aws-vfio-patch - -- name: Reload systemd-modules - ansible.builtin.systemd: - name: "systemd-modules-load" - state: "restarted" - tags: - - aws-reload-systemd-modules +# +#- name: Create vfio-pci Patch Directory +# ansible.builtin.file: +# path: "/opt/patches/" +# state: "directory" +# tags: +# - aws-vfio-patch +# +#- name: Get vfio-pci WC Patch +# ansible.builtin.get_url: +# url: "https://github.com/amzn/amzn-drivers/raw/master/userspace/dpdk/enav2-vfio-patch/patches/{{ item }}" +# dest: "/opt/patches/{{ item }}" +# mode: 0744 +# with_items: +# - "linux-4.10-vfio-wc.patch" +# - "linux-5.8-vfio-wc.patch" +# - "linux-5.15-vfio-wc.patch" +# tags: +# - aws-vfio-patch +# +#- name: Copy vfio-pci WC Patch +# ansible.builtin.copy: +# src: "files/get-vfio-with-wc.sh" +# dest: "/opt" +# mode: 0744 +# tags: +# - aws-vfio-patch +# +#- name: Compile vfio-pci With WC Patch +# ansible.builtin.shell: "/bin/bash /opt/get-vfio-with-wc.sh" +# environment: +# DEBIAN_FRONTEND: "noninteractive" +# TERM: "vt100" +# tags: +# - aws-vfio-patch - name: Adjust nr_hugepages ansible.builtin.sysctl: