diff options
author | Peter Mikus <peter.mikus@protonmail.ch> | 2024-10-18 14:26:36 +0200 |
---|---|---|
committer | Peter Mikus <peter.mikus@protonmail.ch> | 2024-10-24 10:41:05 +0000 |
commit | 34a7bf412a78d8c2e259d631ec770047fe5b311d (patch) | |
tree | 55edb0c514676b4a302718aeac9c48846cfbea6f /fdio.infra.ansible/roles/dpdk | |
parent | 120716e561c1d0e3c7d06cbb96d1f70cf3949e5c (diff) |
feat(ansible): Ubuntu 24.04
Signed-off-by: Peter Mikus <peter.mikus@protonmail.ch>
Change-Id: Id486cbf0cdade79450912b54c068a3287c4edd36
Diffstat (limited to 'fdio.infra.ansible/roles/dpdk')
4 files changed, 15 insertions, 17 deletions
diff --git a/fdio.infra.ansible/roles/dpdk/defaults/main.yaml b/fdio.infra.ansible/roles/dpdk/defaults/main.yaml index d94e9ac91f..22e960e98c 100644 --- a/fdio.infra.ansible/roles/dpdk/defaults/main.yaml +++ b/fdio.infra.ansible/roles/dpdk/defaults/main.yaml @@ -1,16 +1,15 @@ --- # file: defaults/main.yaml -packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}" +packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower] + packages_by_arch[ansible_machine] }}" packages_base: - [] packages_by_distro: ubuntu: - jammy: - - "build-essential" - - "libnuma-dev" + - "build-essential" + - "libnuma-dev" packages_by_arch: aarch64: @@ -20,5 +19,5 @@ packages_by_arch: dpdk_target_dir: "/opt" dpdk_version: - - "23.11" + - "24.07" dpdk_url: "https://fast.dpdk.org/rel" diff --git a/fdio.infra.ansible/roles/dpdk/molecule/default/converge.yml b/fdio.infra.ansible/roles/dpdk/molecule/default/converge.yml index ab8392c3dc..505f9f4393 100644 --- a/fdio.infra.ansible/roles/dpdk/molecule/default/converge.yml +++ b/fdio.infra.ansible/roles/dpdk/molecule/default/converge.yml @@ -1,9 +1,9 @@ --- # file: molecule/default/converge.yaml -- name: Converge +- name: "Converge" hosts: all become: true roles: - - role: csit.dpdk + - role: "csit.dpdk" diff --git a/fdio.infra.ansible/roles/dpdk/tasks/deploy_block.yaml b/fdio.infra.ansible/roles/dpdk/tasks/deploy_block.yaml index 1f972f5320..d5afe2d3f8 100644 --- a/fdio.infra.ansible/roles/dpdk/tasks/deploy_block.yaml +++ b/fdio.infra.ansible/roles/dpdk/tasks/deploy_block.yaml @@ -1,14 +1,14 @@ --- # file: tasks/deploy_block.yaml -- name: Download Release {{ item }} +- name: "Download Release {{ item }}" ansible.builtin.get_url: url: "{{ dpdk_url }}/dpdk-{{ item }}.tar.xz" dest: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz" mode: 0644 register: dpdk_downloaded -- name: Extract Release {{ item }} +- name: "Extract Release {{ item }}" ansible.builtin.unarchive: remote_src: true src: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz" @@ -17,7 +17,7 @@ when: dpdk_downloaded register: dpdk_extracted -- name: Compile Release I +- name: "Compile Release I" ansible.builtin.command: "meson -Dexamples=l3fwd build" args: chdir: "{{ dpdk_target_dir }}/dpdk-{{ item }}" @@ -25,7 +25,7 @@ CFLAGS: "-DRTE_LIBRTE_I40E_16BYTE_RX_DESC=y" register: dpdk_compiled -- name: Compile Release II +- name: "Compile Release II" ansible.builtin.command: "ninja -C build" args: chdir: "{{ dpdk_target_dir }}/dpdk-{{ item }}" diff --git a/fdio.infra.ansible/roles/dpdk/tasks/main.yaml b/fdio.infra.ansible/roles/dpdk/tasks/main.yaml index 4f6c9ec9f2..1b7886386a 100644 --- a/fdio.infra.ansible/roles/dpdk/tasks/main.yaml +++ b/fdio.infra.ansible/roles/dpdk/tasks/main.yaml @@ -1,24 +1,23 @@ --- # file: tasks/main.yaml -- name: Update Package Cache (APT) +- name: "Update Package Cache (APT)" ansible.builtin.apt: update_cache: true - cache_valid_time: 3600 when: - - ansible_distribution == 'Ubuntu' + - ansible_os_family == 'Debian' tags: - dpdk-inst-prerequisites -- name: Prerequisites +- name: "Prerequisites" ansible.builtin.package: name: "{{ packages | flatten(levels=1) }}" state: "latest" tags: - dpdk-inst-prerequisites -- name: Multiple DPDK Versions - include_tasks: deploy_block.yaml +- name: "Multiple DPDK Versions" + include_tasks: "deploy_block.yaml" loop: "{{ dpdk_version }}" tags: - dpdk-inst |