The attached playbook acts as a single command for collecting detailed network information. When executed it collects the following command from the mentioned Network Oses
Network OS | Command |
---|---|
Cisco Nexus OS | show tech |
Cisco IOS | show tech |
Arista EOS | show tech |
JunOS | request support information |
This playbook does not require an Ansible inventory and captures the detailed network information from only a single device.
Works with Ansible 2.5 and higher
- TFTP
- FTP (WIP)
- SCP (WIP)
swname
: switch hostname or IPuser
: user to log into network devicepasswd
: password to log into the network deviceostype
: can be either 'nxos', 'eos', 'junos' or 'ios'file_storage
: currently only set totftp
User Input (Extra Variables)
tftpserver
: TFTP server hostname and IP
Output Filename
showtech_{{ swname }}_{{ timestamp}}.txt
Example:
showtech_sw01_2018-02-14T03:30:49Z.txt
This repository provides 4 example user input variable files.
NOTE: these examples change the
show_tech_command
variable to capture simple command for demo purposes. By default the show tech command is properly configured per the OS type.
Example 1: NxOS using a file with user input variables
ansible-playbook capture-showtech.yml -e @tests/test_nxos_vars.yml
Example2: IOS example using -e options
ansible-playbook capture-showtech.yml -e ostype=ios -e swname=sw01 -e user=admin -e passwd=cisco -e tftpserver=10.200.1.1 -e file_storage=tftp
MIT