Revert "fix(IPsecUtil): Delete keywords no longer used"
[csit.git] / fdio.infra.ansible / roles / trex / tasks / deploy_block.yaml
1 ---
2 # file: tasks/deploy_block.yaml
3
4 - name: Get Release {{ item }}
5   ansible.builtin.get_url:
6     url: "{{ trex_url }}/v{{ item }}.tar.gz"
7     dest: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
8     validate_certs: false
9     mode: 0644
10   register: trex_downloaded
11
12 - name: Create Directory {{ item }}
13   ansible.builtin.file:
14     path: "{{ trex_target_dir }}/trex-core-{{ item }}"
15     state: "directory"
16
17 - name: Extract Release {{ item }}
18   ansible.builtin.unarchive:
19     remote_src: true
20     src: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
21     dest: "{{ trex_target_dir }}/"
22     creates: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
23   register: trex_extracted
24
25 - name: Compile Release {{ item }} Part I
26   ansible.builtin.command: "./b configure"
27   args:
28     chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
29   when: trex_extracted.changed
30
31 - name: Compile Release {{ item }} Part II
32   ansible.builtin.command: "./b build"
33   args:
34     chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
35   async: 3000
36   poll: 0
37   register: trex_built
38   when: trex_extracted.changed
39
40 - name: Check if T-Rex is Compiled
41   async_status:
42     jid: "{{ trex_built.ansible_job_id }}"
43   register: trex_built
44   until: trex_built.finished
45   delay: 10
46   retries: 300
47   when: trex_extracted.changed
48
49 - name: Compile Release {{ item }} Part III
50   ansible.builtin.command: "make -j 16"
51   args:
52     chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
53   when: trex_extracted.changed
54
55 - name: Compile Release {{ item }} Part IV
56   ansible.builtin.command: "make install"
57   args:
58     chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
59   when: trex_extracted.changed
60
61 - name: Link libc.a to liblibc.a
62   ansible.builtin.command: "ln -s -f /usr/lib/x86_64-linux-gnu/libc.a /usr/lib/x86_64-linux-gnu/liblibc.a"
63   when: trex_extracted.changed