Debian Codegraph @

ansible_collections/cisco/ios/tests/integration/targets/ios_vlans/tasks/main.yaml

raw symbols SCIP
1 ---
2 - name: Set a fact for 'skip_test'
3 ansible.builtin.set_fact:
4 skip_test: true
5
6 - name: Gather device information
7 cisco.ios.ios_command:
8 commands:
9 - show version
10 - show vlan brief
11 - show ip route
12 register: device_info
13 ignore_errors: true
14
15 - name: Determine if device supports Layer 2 (VLANs)
16 ansible.builtin.set_fact:
17 supports_l2: "{{ 'VLAN' in device_info.stdout[1] | default('') }}"
18
19 - name: Determine if device supports Layer 3 (Routing)
20 ansible.builtin.set_fact:
21 supports_l3: "{{ 'Gateway of last resort' in device_info.stdout[2] | default('') }}"
22
23 - name: Skip test if VLANs are not supported (L2)
24 ansible.builtin.meta: end_play
25 when: not supports_l2
26
27 - name: Main task for vlans module
28 ansible.builtin.include_tasks: cli.yaml
29 tags:
30 - l2_tests
31 when: not skip_test