mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
Add ios_linkagg DI module (#33215)
* Add ios_linkagg DI module Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * pep8 fixes * update ios version * ios_linkagg integration test Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * fix port-channel commands * update test * ios tests to network_cli Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * add required_together check in aggregate and update test Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * fix pep8 issues * Add discovery of ios switch type Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
557716dc49
commit
2e76f04a9e
9 changed files with 723 additions and 180 deletions
|
@ -11,3 +11,15 @@
|
|||
# http://jinja.pocoo.org/docs/2.9/templates/#truncate
|
||||
- set_fact:
|
||||
shorter_hostname: '{{ inventory_hostname_short| truncate(10, True, "") }}'
|
||||
|
||||
- name: "Discover IOS L2/L3 switch type"
|
||||
ios_command:
|
||||
commands: ['show version']
|
||||
connection: network_cli
|
||||
become: yes
|
||||
register: result
|
||||
|
||||
- set_fact: switch_type=""
|
||||
|
||||
- set_fact: switch_type="L2"
|
||||
when: '"l2" in result.stdout[0]'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue