Skip to content

Commit ae87da1

Browse files
committed
[ansible/fanout_connect.yml] Support the deployment of Spytest
Modified `rootfanout_connect.yml` to support assigning vlans from multiple DUTs to the root fanout trunk port that is connected to the vm server. Signed-off-by: Longxiang Lyu <[email protected]>
1 parent 9e00431 commit ae87da1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

ansible/roles/fanout/tasks/rootfanout_connect.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
delegate_to: localhost
1313
tags: always
1414
register: devinfo
15+
when: dut.split(',')|length == 1
16+
17+
- name: Gathering connection facts about the DUTs or leaffanout device
18+
conn_graph_facts: hosts={{ dut.split(',') }}
19+
delegate_to: localhost
20+
tags: always
21+
register: devinfo
22+
when: dut.split(',')|length > 1
1523

1624
- name: Gathering connection facts about the lab
1725
conn_graph_facts:
@@ -20,7 +28,7 @@
2028
register: lab
2129

2230
- set_fact:
23-
dev_vlans: "{{ devinfo.ansible_facts.device_vlan_range }}"
31+
dev_vlans: "{{ devinfo.ansible_facts.device_vlan_range|flatten(levels=1) }}"
2432
lab_devices: "{{ lab.ansible_facts.device_info }}"
2533

2634
- name: Find the root fanout switch

0 commit comments

Comments
 (0)