aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml
blob: 9577c5c392b43a0d225198b015b350041bed246b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
# file: roles/dpdk/tasks/main.yaml

- name: DPDK - Install Distribution - Release - Machine Prerequisites
  package:
    name: "{{ packages | flatten(levels=1) }}"
    state: latest
    update_cache: true
  tags:
    - install-dependencies

- name: DPDK - Download Release Archive
  get_url:
    url: "{{ dpdk_url }}/dpdk-{{ dpdk_version }}.tar.xz"
    dest: "{{ dpdk_target_dir }}/dpdk-{{ dpdk_version }}.tar.xz"
    mode: 0644
  register: "linux__dpdk_downloaded"
  tags:
    - install-dpdk

- name: Extract DPDK release archive
  unarchive:
    remote_src: true
    src: "{{ dpdk_target_dir }}/dpdk-{{ dpdk_version }}.tar.xz"
    dest: "{{ dpdk_target_dir }}/"
    creates: "{{ dpdk_target_dir }}/dpdk-stable-{{ dpdk_version }}"
  when: "linux__dpdk_downloaded"
  register: "linux__dpdk_extracted"
  tags:
    - install-dpdk

- name: Compile DPDK release
  become: yes
  command: "make install T={{ dpdk_build_targets[ansible_machine] }}-linux-gcc DESTDIR={{ dpdk_target_dir }}/dpdk-stable-{{ dpdk_version }} chdir={{ dpdk_target_dir }}/dpdk-stable-{{ dpdk_version }}"
  when: "linux__dpdk_extracted"
  tags:
    - install-dpdk