mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
ios_l2_interface (#35054)
* Fix sending 'None' to device on ios * Add ios_l2_interface module & tests * Skip l2 tests on non-l2 images * Allow test to continue on non-L2 hosts
This commit is contained in:
parent
4d58d16793
commit
bf1580a333
13 changed files with 768 additions and 116 deletions
|
@ -23,3 +23,30 @@
|
|||
|
||||
- set_fact: switch_type="L2"
|
||||
when: '"l2" in result.stdout[0]'
|
||||
|
||||
- block:
|
||||
- name: Set test interface to GigabitEthernet0/1 as we are on Cisco IOS
|
||||
set_fact: test_interface=GigabitEthernet0/1
|
||||
- name: Set test interface 2 to GigabitEthernet0/2 as we are on Cisco IOS
|
||||
set_fact: test_interface2=GigabitEthernet0/2
|
||||
when: "'Cisco IOS' in result.stdout[0]"
|
||||
|
||||
- block:
|
||||
- name: Set test interface to GigabitEthernet2 as we are on Cisco IOS-XE
|
||||
set_fact: test_interface=GigabitEthernet2
|
||||
- name: Disable autonegotiation on GigabitEthernet2
|
||||
ios_config:
|
||||
lines:
|
||||
- no negotiation auto
|
||||
parents: int GigabitEthernet2
|
||||
authorize: yes
|
||||
|
||||
- name: Set test interface 2 to GigabitEthernet3 as we are on Cisco IOS-XE
|
||||
set_fact: test_interface2=GigabitEthernet3
|
||||
- name: Disable autonegotiation on GigabitEthernet3
|
||||
ios_config:
|
||||
lines:
|
||||
- no negotiation auto
|
||||
parents: int GigabitEthernet3
|
||||
authorize: yes
|
||||
when: "'Cisco IOS-XE' in result.stdout[0]"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue