aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/intel/tasks/qat.yaml
blob: 10dab99dc813bfad6e4d8cbd6d05790b9881479a (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
38
39
40
41
42
43
44
45
46
47
---
# file: tasks/qat.yaml

- name: Get QAT Driver
  ansible.builtin.uri:
    url: "{{ intel_download_url }}/{{ intel_qat_url[qat] }}"
    follow_redirects: "all"
    force: true
    dest: "{{ intel_extract_dir }}/QAT20.L.{{ qat }}.tar.gz"
    mode: "0644"
  failed_when: false
  tags:
    - intel-inst

- name: Create a Directory For QAT Driver
  ansible.builtin.file:
    path: "{{ intel_extract_dir }}/QAT20.L.{{ qat }}/"
    state: "directory"
    mode: "0755"
  tags:
    - intel-inst

- name: Extract QAT Driver
  ansible.builtin.unarchive:
    remote_src: true
    src: "{{ intel_extract_dir }}/QAT20.L.{{ qat }}.tar.gz"
    dest: "{{ intel_extract_dir }}/QAT20.L.{{ qat }}/"
  register: intel_driver_extracted
  tags:
    - intel-inst

- name: Install QAT Driver
  ansible.builtin.command: "{{ item }}"
  args:
    chdir: "{{ intel_extract_dir }}/QAT20.L.{{ qat }}"
  become: true
  with_items:
    - "wget http://security.ubuntu.com/ubuntu/pool/main/s/systemd/libudev-dev_249.11-0ubuntu3.7_amd64.deb"
    - "dpkg-deb -xv libudev-dev_249.11-0ubuntu3.9_amd64.deb ."
    - "cp ./usr/include/libudev.h /usr/include/libudev.h"
    - "./configure --enable-icp-sriov=host --enable-icp-sym-only"
    - "make"
    - "make install"
  when:
    - intel_driver_extracted
  tags:
    - intel-inst