File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
playbooks/roles/nvidia_peermem/tasks Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 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'
You can’t perform that action at this time.
0 commit comments