aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles/intel/tasks/main.yaml
blob: 63ab5e03b6e895b5e075e62440085f11dadf0f7d (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
# file: roles/intel/tasks/main.yaml

- name: Inst - Check Presence of Intel E810 Hardware
  shell: "lspci -d 8086:1592"
  register: intel_e810_pcis
  failed_when: no
  changed_when: no
  tags:
    - intel-inst

- name: Inst - Update Package Cache (APT)
  apt:
    update_cache: yes
    cache_valid_time: 3600
  when:
    - ansible_distribution|lower == 'ubuntu'
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst-prerequisites

- name: Inst - Prerequisites
  package:
    name: "{{ packages | flatten(levels=1) }}"
    state: latest
  when:
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst-prerequisites

- name: Inst - Get Network Adapter Driver
  get_url:
    url: "{{ intel_ice_driver_url }}"
    dest: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
    mode: 0644
  when:
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst

- name: Inst - Extract Network Adapter Driver
  unarchive:
    remote_src: true
    src: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}.tar.gz"
    dest: "{{ intel_ice_driver_dir }}/"
    creates: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}"
  register: intel_driver_extracted
  when:
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst

- name: Inst - Network Adapter Driver
  command: "make install; modprobe -r ice; modprobe ice"
  args:
    chdir: "{{ intel_ice_driver_dir }}/ice-{{ intel_ice_version }}/src"
  failed_when: no
  when:
    - intel_e810_pcis.stdout_lines | length > 0
    - intel_driver_extracted
  tags:
    - intel-inst

- name: Inst - Get Dynamic Device Personalization (DDP) Package
  get_url:
    url: "{{ intel_ddp_profile_url }}"
    dest: "{{ intel_ddp_profile_dir }}/800-Series-Comms-Binary-Package-{{ intel_ddp_version }}.zip"
    mode: 0644
  when:
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst

- name: Inst - Extract Dynamic Device Personalization (DDP) Package
  unarchive:
    remote_src: true
    src: "{{ intel_ddp_profile_dir }}/800-Series-Comms-Binary-Package-{{ intel_ddp_version }}.zip"
    dest: "{{ intel_ddp_profile_dir }}/"
    creates: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.zip"
  register: intel_driver_extracted
  when:
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst

- name: Inst - Extract Dynamic Device Personalization (DDP) Package
  unarchive:
    remote_src: true
    src: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.zip"
    dest: "{{ intel_ddp_profile_dir }}/"
  register: intel_driver_extracted
  when:
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst

- name: Inst - Copy Dynamic Device Personalization (DDP) Package
  copy:
    src: "{{ intel_ddp_profile_dir }}/ice_comms-{{ intel_ddp_version }}.pkg"
    dest: "/lib/firmware/updates/intel/ice/ddp/ice-{{ intel_ddp_version }}.pkg"
    remote_src: yes
    follow: yes
  when:
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst

- name: Inst - Link Dynamic Device Personalization (DDP) Package
  file:
    src: "ice-{{ intel_ddp_version }}.pkg"
    dest: "/lib/firmware/updates/intel/ice/ddp/ice.pkg"
    state: link
  when:
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst

- name: Inst - Extract Dynamic Device Personalization (DDP) Package (cleanup)
  file:
    path: "{{ item }}"
    state: absent
  with_items:
    - "{{ intel_ddp_profile_dir }}/E810 DDP for Comms TechGuide_Rev2.3.pdf"
    - "{{ intel_ddp_profile_dir }}/Intel_800_series_market_segment_DDP_license.txt"
  when:
    - intel_e810_pcis.stdout_lines | length > 0
  tags:
    - intel-inst