diff options
Diffstat (limited to 'fdio.infra.ansible/roles')
-rw-r--r-- | fdio.infra.ansible/roles/aws/handlers/main.yaml | 14 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/aws/tasks/main.yaml | 22 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/aws/tasks/ubuntu_noble.yaml | 19 | ||||
-rw-r--r-- | fdio.infra.ansible/roles/calibration/defaults/main.yaml | 1 |
4 files changed, 37 insertions, 19 deletions
diff --git a/fdio.infra.ansible/roles/aws/handlers/main.yaml b/fdio.infra.ansible/roles/aws/handlers/main.yaml index bc160a3263..b9680b10ea 100644 --- a/fdio.infra.ansible/roles/aws/handlers/main.yaml +++ b/fdio.infra.ansible/roles/aws/handlers/main.yaml @@ -1,25 +1,25 @@ --- -# file: roles/aws/handlers/main.yaml +# file: handlers/main.yaml -- name: Reload systemd-modules +- name: "Reload systemd-modules" systemd: name: "systemd-modules-load" state: "restarted" tags: - reload-systemd-modules -- name: Update GRUB - ansible.builtin.command: update-grub +- name: "Update GRUB" + ansible.builtin.command: "update-grub" tags: - update-grub -- name: Reboot Server +- name: "Reboot Server" ansible.builtin.reboot: reboot_timeout: 3600 tags: - reboot-server -- name: Restart SSHd +- name: "Restart SSHd" ansible.builtin.service: - name: sshd + name: "sshd" state: restarted diff --git a/fdio.infra.ansible/roles/aws/tasks/main.yaml b/fdio.infra.ansible/roles/aws/tasks/main.yaml index b33848e2d2..b06fe93d42 100644 --- a/fdio.infra.ansible/roles/aws/tasks/main.yaml +++ b/fdio.infra.ansible/roles/aws/tasks/main.yaml @@ -1,19 +1,19 @@ --- # file: tasks/main.yaml -- name: Edit repositories +- name: "Edit repositories" include_tasks: "{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml" tags: - aws-edit-repo -- name: Prerequisites +- name: "Prerequisites" ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: "latest" tags: - aws-inst-prerequisites -- name: Load Kernel Modules By Default +- name: "Load Kernel Modules By Default" ansible.builtin.lineinfile: path: "/etc/modules" state: "present" @@ -24,7 +24,7 @@ tags: - aws-load-kernel-modules -- name: Add Kernel Modules Options (igb_uio) +- name: "Add Kernel Modules Options (igb_uio)" ansible.builtin.lineinfile: path: "/etc/modprobe.d/igb_uio.conf" state: "present" @@ -35,7 +35,7 @@ tags: - aws-load-kernel-modules -- name: Add Kernel Modules Options (vfio-pci) +- name: "Add Kernel Modules Options (vfio-pci)" ansible.builtin.lineinfile: path: "/etc/modprobe.d/vfio-noiommu.conf" state: "present" @@ -46,7 +46,7 @@ tags: - aws-load-kernel-modules -- name: Kernel Parameters +- name: "Kernel Parameters" ansible.builtin.lineinfile: path: "/etc/default/grub" state: "present" @@ -59,17 +59,15 @@ - meta: flush_handlers -- name: Disable Password Login +- 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 +- name: "Recursively Delete Other Configs" ansible.builtin.file: path: "/etc/ssh/sshd_config.d" state: "absent" @@ -119,7 +117,7 @@ # tags: # - aws-vfio-patch -- name: Adjust nr_hugepages +- name: "Adjust nr_hugepages" ansible.builtin.sysctl: name: "vm.nr_hugepages" value: "8192" @@ -129,7 +127,7 @@ tags: - aws-set-hugepages -- name: Shutdown host with delay +- name: "Shutdown host with delay" ansible.builtin.command: "/sbin/shutdown -P +720" tags: - aws-set-self-terminate diff --git a/fdio.infra.ansible/roles/aws/tasks/ubuntu_noble.yaml b/fdio.infra.ansible/roles/aws/tasks/ubuntu_noble.yaml new file mode 100644 index 0000000000..f99da4fdb0 --- /dev/null +++ b/fdio.infra.ansible/roles/aws/tasks/ubuntu_noble.yaml @@ -0,0 +1,19 @@ +--- +# file: tasks/ubuntu_noble.yaml + +- name: "Enable deb-src APT Repository" + ansible.builtin.apt_repository: + repo: "deb-src {{ packages_repo[ansible_distribution|lower][ansible_machine] }} noble main" + state: "present" + update_cache: true + tags: + - aws-enable-src-repo + +- name: "Update Package Cache (APT)" + ansible.builtin.apt: + update_cache: true + cache_valid_time: 3600 + when: + - ansible_distribution == 'Ubuntu' + tags: + - aws-enable-src-repo
\ No newline at end of file diff --git a/fdio.infra.ansible/roles/calibration/defaults/main.yaml b/fdio.infra.ansible/roles/calibration/defaults/main.yaml index dac42b84d4..8f3f0c8226 100644 --- a/fdio.infra.ansible/roles/calibration/defaults/main.yaml +++ b/fdio.infra.ansible/roles/calibration/defaults/main.yaml @@ -16,6 +16,7 @@ kernel_version_by_distro_by_arch: noble: x86_64: - "6.8.0-45-generic" + - "6.8.0-1016-aws" - "5.15.0-1000-aws" - "5.4.0-1009-aws" aarch64: |