File tree Expand file tree Collapse file tree
tools/cloud-build/daily-tests/ansible_playbooks/test-validation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 - custom_vars.gpu_partition is defined
1919
2020- name : Get default partition configuration
21- ansible.builtin.shell : " scontrol show config | grep '^DefaultPartition' "
22- register : default_partition_config
21+ ansible.builtin.shell : sinfo --noheader --all --format "%P" | grep "\* "
22+ register : sinfo_default_partition_output
2323 retries : 10
2424 delay : 12
25- until : default_partition_config .stdout | length > 0
25+ until : sinfo_default_partition_output .stdout | length > 0
2626 changed_when : false
2727
2828- name : Extract default partition name
2929 set_fact :
30- default_partition : " {{ (default_partition_config.stdout.split('='))[1] | trim }}"
30+ default_partition : " {{ sinfo_default_partition_output.stdout_lines | first | replace('*', '') }}"
3131
3232- name : Assert default partition is the GPU partition
3333 ansible.builtin.assert :
You can’t perform that action at this time.
0 commit comments