File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
ansible/roles/lustre/tasks Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 11- name : Gather Lustre interface info
22 shell :
33 cmd : |
4- ip r get {{ _lustre_mgs_ip }}
4+ ip --json r get {{ _lustre_mgs_ip }}
55 changed_when : false
66 register : _lustre_ip_r_mgs
77 vars :
88 _lustre_mgs_ip : " {{ lustre_mgs_nid | split('@') | first }}"
99
1010- name : Set facts for Lustre interface
1111 set_fact :
12- _lustre_interface : " {{ _lustre_ip_r_mgs_info[interface_index | int] }}"
13- _lustre_ip : " {{ _lustre_ip_r_mgs_info[ip_index | int] }}"
12+ _lustre_interface : " {{ _lustre_ip_r_mgs_info.dev }}"
13+ _lustre_ip : " {{ _lustre_ip_r_mgs_info.prefsrc }}"
1414 vars :
15- interface_index : " {{ 4 if 'via' in _lustre_ip_r_mgs.stdout_lines.0 else 2 }}"
16- ip_index : " {{ 6 if 'via' in _lustre_ip_r_mgs.stdout_lines.0 else 4 }}"
17- _lustre_ip_r_mgs_info : " {{ _lustre_ip_r_mgs.stdout_lines.0 | split }}"
18- # first line e.g. "10.167.128.1 via 10.179.0.2 dev eth0 src 10.179.3.149 uid 1000"
15+ _lustre_ip_r_mgs_info : " {{ _lustre_ip_r_mgs.stdout | from_json }}"
1916
2017- name : Write LNet configuration file
2118 template :
4643 state : " {{ (item.mount_state | default(lustre_mount_state)) }}"
4744 opts : " {{ item.mount_options | default(lustre_mount_options) }}"
4845 loop : " {{ lustre_mounts }}"
49-
46+
You can’t perform that action at this time.
0 commit comments