Skip to content

Commit 9be56ef

Browse files
committed
Update common.yml
1 parent 63bb9b7 commit 9be56ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

playbooks/roles/nvidia_peermem/tasks/common.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33
shell:
44
cmd: "curl -sH \"Authorization: Bearer Oracle\" -L http://169.254.169.254/opc/v2/instance/ | jq .shape | grep GPU"
55
warn: false
6-
register: shape
6+
register: shape_gpu
77
failed_when: false
88

99
- name: Check if nvidia drivers are installed
1010
shell: cat /sys/module/nvidia/version | wc -l
1111
register: nvidia
12-
when: shape.stdout != ""
12+
when: shape_gpu.stdout != ""
1313

1414
- name: Check if nvidia_peermem module is loaded
1515
shell: lsmod | grep nvidia_peermem | wc -l
1616
register: result
17-
when: shape.stdout != "" and nvidia.stdout == '1'
17+
when: shape_gpu.stdout != "" and nvidia.stdout == '1'
1818

1919
- name: Check ofed version
2020
shell:
2121
cmd: |
2222
/usr/bin/ofed_info |grep MLNX_OFED_LINUX|grep -v rpm|awk -F "(" '{print $2}'|cut -c 6-|awk -F "-" '{print $1}'
2323
register: ofed_version_local
24-
when: shape.stdout != "" and nvidia.stdout == '1'
24+
when: shape_gpu.stdout != "" and nvidia.stdout == '1'
2525

2626
- name: Load nvidia_peermem module
2727
become: true
2828
shell: modprobe nvidia_peermem
29-
when: shape.stdout != "" and nvidia.stdout == '1' and result.stdout != '3' and ofed_version_local.stdout|int >= '5.1'
29+
when: shape_gpu.stdout != "" and nvidia.stdout == '1' and result.stdout != '3' and ofed_version_local.stdout|int >= '5.1'

0 commit comments

Comments
 (0)