Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 2.11 KB

README.md

File metadata and controls

69 lines (48 loc) · 2.11 KB

Ansible Modules for Network Automation

And even get structured data back from CLI devices!


Requirements

  • netmiko
  • TestFSM
  • terminal

Modules


ntc_show_command

Gets config data from devices that don't have an API

  • Synopsis
  • Options
  • Examples

Synopsis

This module offers structured data for CLI enabled devices by using the TextFSM library for templating and netmiko for SSH connectivity

Options

Parameter required default choices comments
username no
    Username used to login to the target device
    vendor yes ssh
      Vendor FROM the index file
      device_type no ssh
        netmiko device type
        template_dir no ntc_templates
          path where TextFSM templates are stored. Default path is ntc with ntc in the same working dir as the playbook being run
          host no
            IP Address or hostname (resolvable by Ansible control host)
            connection no ssh
            • ssh
            • offline
            connect to device using netmiko or read from offline file for testing
            command yes
              Command to execute on target device
              file no
                If using connection=offline, this is the file (with path) of a file that contains raw text output, i.e. 'show command' and then the contents of the file will be rendered with the the TextFSM template
                password no
                  Password used to login to the target device
                  index_file no index
                    name of index file. file location must be relative to the template_dir

                    Examples

                    
                    # get vlan data
                    - ntc_show_command:
                        connection=ssh
                        vendor=cisco
                        device_type=cisco_nxos
                        command='show vlan'
                        host={{ inventory_hostname }}
                        username={{ username }}
                        password={{ password }}
                    
                    
                    


                    Created by Network to Code, LLC For: 2015