|
3 | 3 | become: true
|
4 | 4 | hosts: ofed-builder
|
5 | 5 | gather_facts: false
|
6 |
| - vars: |
7 |
| - stackhpc_mlnx_ofed_file_string: MLNX_OFED_LINUX-{{ stackhpc_pulp_mlnx_ofed_version }}-rhel9.{{ stackhpc_pulp_repo_rocky_9_minor_version }}-x86_64 |
8 | 6 | tasks:
|
9 | 7 | - name: Extend the home logical volume
|
10 | 8 | community.general.lvol:
|
11 | 9 | vg: rootvg
|
12 | 10 | lv: lv_home
|
13 | 11 | size: +5G
|
14 | 12 |
|
| 13 | + - name: Extend the temporary logical volume |
| 14 | + community.general.lvol: |
| 15 | + vg: rootvg |
| 16 | + lv: lv_var_tmp |
| 17 | + size: +5G |
| 18 | + |
15 | 19 | - name: Install package dependencies
|
16 | 20 | ansible.builtin.dnf:
|
17 | 21 | name:
|
|
38 | 42 | ansible.builtin.shell:
|
39 | 43 | cmd: |
|
40 | 44 | grubby --set-default /boot/$(rpm -qa kernel-devel | sed 's/kernel-devel/vmlinuz/g')
|
41 |
| - echo 'GRUB_DEFAULT=2' >> /etc/default/grub |
42 | 45 | grub2-mkconfig -o /boot/grub2/grub.cfg
|
43 | 46 |
|
| 47 | + - name: Disable noexec in temporary file system |
| 48 | + ansible.builtin.replace: |
| 49 | + path: /etc/fstab |
| 50 | + regexp: '^(exclude=.*)noexec,\*\s*' |
| 51 | + replace: '\1' |
| 52 | + |
44 | 53 | - name: Reboot builder to apply kernel update
|
45 | 54 | ansible.builtin.reboot:
|
46 | 55 | reboot_timeout: 600
|
47 | 56 |
|
| 57 | + - name: Add DOCA host repository |
| 58 | + ansible.builtin.dnf: |
| 59 | + name: https://developer.nvidia.com/downloads/networking/secure/doca-sdk/DOCA_2.8/doca-host-2.8.0-204000_{{ stackhpc_pulp_doca_ofed_version }}_rhel9{{ stackhpc_pulp_repo_rocky_9_minor_version }}.x86_64.rpm |
| 60 | + |
| 61 | + - name: Install DOCA extra packages |
| 62 | + ansible.builtin.dnf: |
| 63 | + name: doca-extra |
| 64 | + |
48 | 65 | - name: Create build directory
|
49 | 66 | ansible.builtin.file:
|
50 | 67 | path: /home/cloud-user/ofed
|
51 | 68 | state: directory
|
52 | 69 | mode: 0777
|
53 | 70 |
|
54 |
| - - name: Download MellanoxOFED archive |
55 |
| - ansible.builtin.get_url: |
56 |
| - url: https://content.mellanox.com/ofed/MLNX_OFED-{{ stackhpc_pulp_mlnx_ofed_version }}/{{ stackhpc_mlnx_ofed_file_string }}.tgz |
57 |
| - dest: /home/cloud-user/ofed/ofed-archive.tgz |
58 |
| - |
59 |
| - - name: Extract MellanoxOFED archive |
60 |
| - ansible.builtin.unarchive: |
61 |
| - src: /home/cloud-user/ofed/ofed-archive.tgz |
62 |
| - dest: /home/cloud-user/ofed |
| 71 | + - name: Set build directory |
| 72 | + ansible.builtin.lineinfile: |
| 73 | + path: /opt/mellanox/doca/tools/doca-kernel-support |
| 74 | + search_string: 'TMP_DIR=$1' |
| 75 | + line: ' TMP_DIR=/home/cloud-user/ofed' |
63 | 76 |
|
64 | 77 | - name: Ensure the current kernel is supported
|
65 | 78 | ansible.builtin.shell:
|
66 | 79 | cmd: |
|
67 |
| - /home/cloud-user/ofed/{{ stackhpc_mlnx_ofed_file_string }}/mlnx_add_kernel_support.sh \ |
68 |
| - --mlnx_ofed /home/cloud-user/ofed/{{ stackhpc_mlnx_ofed_file_string }} \ |
69 |
| - --tmpdir /home/cloud-user/ofed/ofed-build \ |
70 |
| - --make-tgz -y \ |
71 |
| -
|
72 |
| - - name: Extract the new archive |
73 |
| - ansible.builtin.unarchive: |
74 |
| - src: /home/cloud-user/ofed/ofed-build/{{ stackhpc_mlnx_ofed_file_string }}-ext.tgz |
75 |
| - dest: /home/cloud-user/ofed/ |
| 80 | + /opt/mellanox/doca/tools/doca-kernel-support |
0 commit comments