This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tsg-tsg-os-buildimage/ansible/roles/OFED/tasks/main.yml
songyanchao 6eb31af4ea 🎈 perf(TSG-12696): 修改OFED版本号
修改OFED版本号
2022-11-16 23:13:00 -05:00

78 lines
2.4 KiB
YAML

---
- name: "copy OFED installer package to to destination server"
copy:
src: "{{ role_path }}/files/"
dest: "/tmp/OFED/"
- name: "create unarchive directory"
file:
path: "/tmp/OFED/unarchived"
state: directory
- name: "Backup and Replace the uname tools"
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
remote_src: yes
with_items:
- { src: "/usr/bin/uname" , dest: "/usr/bin/uname-bak" , mode: "0755" }
- { src: "/tmp/OFED/uname" , dest: "/usr/bin/uname" , mode: "0755" }
######TSG-X-P0804 install start######
- name: "unarchive OFED installer"
unarchive:
src: /tmp/OFED/MLNX_OFED_SRC-5.8-1.0.1.1.tgz
dest: /tmp/OFED/unarchived/
remote_src: yes
when: runtime_env == 'TSG-X-P0804' or runtime_env == 'TSG-X-P0906'
- name: "Get linux kernel file path"
shell: uname -r
register: obtain_kernel_version
when: runtime_env == 'TSG-X-P0804' or runtime_env == 'TSG-X-P0906'
- name: "execute OFED installer"
shell: /tmp/OFED/unarchived/MLNX_OFED_SRC-5.8-1.0.1.1/install.pl -k {{obtain_kernel_version.stdout}} --all --force
environment:
MAKEFLAGS :
when: runtime_env == 'TSG-X-P0804' or runtime_env == 'TSG-X-P0906'
- name: "unarchive MFT RPM"
unarchive:
src: /tmp/OFED/mft-4.20.0-34-x86_64-rpm.tgz
dest: /tmp/OFED/unarchived/
remote_src: yes
when: runtime_env == 'TSG-X-P0804' or runtime_env == 'TSG-X-P0906'
- name: "execute MFT installer"
shell: /tmp/OFED/unarchived/mft-4.20.0-34-x86_64-rpm/install.sh
when: runtime_env == 'TSG-X-P0804' or runtime_env == 'TSG-X-P0906'
######TSG-X-P0804 install end ######
######TSG-X-P1403 install start######
- name: "unarchive OFED installer"
unarchive:
src: /tmp/OFED/MLNX_OFED_LINUX-5.5-1.0.3.2-rhel7.9-x86_64-ext.tgz
dest: /tmp/OFED/unarchived/
remote_src: yes
when: runtime_env == 'TSG-X-P1403'
- name: "execute OFED installer"
shell: /tmp/OFED/unarchived/MLNX_OFED_LINUX-5.5-1.0.3.2-rhel7.9-x86_64-ext/mlnxofedinstall --add-kernel-support --kernel 3.10.0-1160.59.1.el7.x86_64 --force --without-depcheck
when: runtime_env == 'TSG-X-P1403'
######TSG-X-P1403 install end ######
- name: "enable auto update firmware on boot"
replace:
path: "/etc/infiniband/openib.conf"
regexp: 'RUN_FW_UPDATER_ONBOOT=no'
replace: 'RUN_FW_UPDATER_ONBOOT=yes'
- name: "Restore the uname tools"
copy:
src: "/usr/bin/uname-bak"
dest: "/usr/bin/uname"
mode: "0755"
remote_src: yes