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 183e440da7 🎈 perf(TSG-12947): 将mrzcpd升级至4.5.4,ofed升级至5.5
将mrzcpd升级至4.5.4,ofed升级至5.5
2022-12-07 05:06:23 -05:00

80 lines
2.4 KiB
YAML

---
- name: "copy MFT installer package to to destination server"
copy:
src: "{{ role_path }}/files/"
dest: "/tmp/mft/"
- name: "create unarchive directory"
file:
path: "/tmp/mft/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-backup" , mode: "0755" }
- { src: "/tmp/mft/uname" , dest: "/usr/bin/uname" , mode: "0755" }
- name: "change kernel version for uname"
shell: sed -i -e 's/KERNEL_VERSION/5.17.15-1.el8/' /usr/bin/uname
when: runtime_env == 'TSG-X-P0804' or runtime_env == 'TSG-X-P0906'
- name: "change kernel version for uname"
shell: sed -i -e 's/KERNEL_VERSION/3.10.0-1160.59.1.el7/' /usr/bin/uname
when: runtime_env == 'TSG-X-P1403'
- name: "create kernel directory"
file:
path: "/lib/modules/3.10.0-1160.59.1.el7.x86_64"
state: directory
when: runtime_env == 'TSG-X-P1403'
- name: "ln kernel for el7"
shell: ln -vfs --relative /usr/src/kernels/3.10.0-1160.59.1.el7.x86_64/ /lib/modules/3.10.0-1160.59.1.el7.x86_64/build
when: runtime_env == 'TSG-X-P1403'
###### TSG-X-P0804 TSG-X-P0906 ofed install start ######
- name: "install rpm packages: ofed"
yum:
name: "mlnx-ofed-all-5.17.15-1.el8-v1.0.0-20221206.noarch"
conf_file: "{{ rpm_repo_config_path }}"
state: present
when: runtime_env == 'TSG-X-P0804' or runtime_env == 'TSG-X-P0906'
############ end ############
###### TSG-X-P1403 ofed install start ######
- name: "install rpm packages: ofed"
yum:
name: "mlnx-ofed-all-3.10.0-1160.59.1.el7-v1.0.0-20221206.noarch"
conf_file: "{{ rpm_repo_config_path }}"
state: present
when: runtime_env == 'TSG-X-P1403'
############ end ############
###### MFT install start ######
- name: "unarchive mft RPM"
unarchive:
src: /tmp/mft/mft-4.20.0-34-x86_64-rpm.tgz
dest: /tmp/mft/unarchived/
remote_src: yes
- name: "execute MFT installer"
shell: /tmp/mft/unarchived/mft-4.20.0-34-x86_64-rpm/install.sh
############ 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-backup"
dest: "/usr/bin/uname"
mode: "0755"
remote_src: yes