Welcome to ntc-docs’s documentation!

Contents:

Hello and welcome to the docs!!!!!

Introduction

Intro to NTC Documentation.

Module Index

Arista Modules

These docs were dynamically created from the modules that can be found here.

eos_acl_entry

Synopsis

Added in version 1.1.0

This module will manage standard ACL entries on EOS nodes

Options
parameter required default choices comments
acltype yes
    The type of ACL to manage. Currently the only supported value for acltype is 'standard'
    (added in 1.1.0)
    action yes
      (added in 1.1.0)
      log no
        Enables or disables the log keyword
        (added in 1.1.0)
        name yes
          The name of the ACL to manage. This name must correspond to the ACL name in the running-configuration of the node
          (added in 1.1.0)
          seqno yes
            The sequence number of the rule that this entry corresponds to.
            (added in 1.1.0)
            srcaddr yes
              The source address corresponding to this rule
              (added in 1.1.0)
              srcprefixlen yes
                The source address prefix mask length. Valid valids are in the range of 1 to 32
                (added in 1.1.0)

                Important

                Requires Arista EOS 4.13.7M or later with command API enabled

                Important

                Requires Python Client for eAPI 0.3.2 or later

                Examples

                - eos_acl_entry: seqno=10 name=foo action=permit srcaddr=0.0.0.0
                  srcprefixlen=32
                
                - eos_acl_entry: seqno=20 name=foo action=deny srcaddr=172.16.10.0
                  srcprefixlen=16
                

                Note

                All configuration is idempotent unless otherwise specified

                Note

                Supports eos metaparameters for using the eAPI transport

                Note

                Supports stateful resource configuration.

                eos_bgp_config

                Synopsis

                Added in version 1.1.0

                The eos_bgp_config module provides resource management of the global BGP routing process for Arista EOS nodes

                Options
                parameter required default choices comments
                bgp_as yes
                  The BGP autonomous system number to be configured for the local BGP routing instance. The value must be in the valid BGP AS range of 1 to 65535.
                  (added in 1.1.0)
                  enable no True
                  • True
                  • False
                  Configures the administrative state for the global BGP routing process. If enable is True then the BGP routing process is administartively enabled and if enable is False then the BGP routing process is administratively disabled.
                  (added in 1.1.0)
                  maximum_ecmp_paths no
                    Configures the maximum number of ecmp paths for each route. The EOS default for this attribute is the maximum value, which varies by hardware platform. Check your Arista documentation for more information. This value should be greater than or equal to maximum_paths.
                    (added in 1.2.0)
                    maximum_paths no
                      Configures the maximum number of parallel routes. The EOS default for this attribute is 1. This value should be less than or equal to maximum_ecmp_paths.
                      (added in 1.2.0)
                      router_id no
                        Configures the BGP routing process router-id value. The router id must be in the form of A.B.C.D
                        (added in 1.1.0)

                        Important

                        Requires Arista EOS 4.13.7M or later with command API enable

                        Important

                        Requires Python Client for eAPI 0.4.0 or later

                        Examples

                        - name: enable BGP routing with AS 65535
                          eos_bgp_config: bgp_as=65535 state=present enable=yes
                        
                        - name: disable the BGP routing process
                          eos_bgp_config: bgp_as=65535 enable=no
                        
                        - name: configure the BGP router-id
                          eos_bgp_config: bgp_as=65535 router_id=1.1.1.1
                        
                        - name: configure the BGP with just max paths
                          eos_bgp_config: bgp_as=65535 router_id=1.1.1.1 maximum_paths=20
                        
                        - name: configure the BGP with maximum_paths and maximum_ecmp_paths
                          eos_bgp_config: bgp_as=65535 router_id=1.1.1.1 maximum_paths=20
                          maximum_ecmp_paths=20
                        

                        Note

                        All configuraiton is idempontent unless otherwise specified

                        Note

                        Supports eos metaparameters for using the eAPI transport

                        Note

                        Supports tateful resource configuration

                        eos_bgp_neighbor

                        Synopsis

                        Added in version 1.1.0

                        This eos_bgp_neighbor module provides stateful management of the neighbor statements for the BGP routing process for Arista EOS nodes

                        Options
                        parameter required default choices comments
                        description no
                          Configures the BGP neighbors description value. The value specifies an arbitrary description to add to the neighbor statement in the nodes running-configuration.
                          (added in 1.1.0)
                          enable no True
                          • True
                          • False
                          Configures the administrative state for the BGP neighbor process. If enable is True then the BGP neighbor process is administartively enabled and if enable is False then the BGP neighbor process is administratively disabled.
                          (added in 1.1.0)
                          name yes
                            The name of the BGP neighbor to manage. This value can be either an IPv4 address or string (in the case of managing a peer group)
                            (added in 1.1.0)
                            next_hop_self no
                              Configures the BGP neighbors next-hop-self value. If enabled then the BGP next-hop-self value is enabled. If disabled, then the BGP next-hop-self community value is disabled.
                              (added in 1.1.0)
                              peer_group no
                                The name of the peer-group value to associate with the neighbor. This argument is only valid if the neighbor is an IPv4 address
                                (added in 1.1.0)
                                remote_as no
                                  Configures the BGP neighbors remote-as value. Valid AS values are in the range of 1 to 65535.
                                  (added in 1.1.0)
                                  route_map_in no
                                    Configures the BGP neigbhors route-map in value. The value specifies the name of the route-map.
                                    (added in 1.1.0)
                                    route_map_out no
                                      Configures the BGP neigbhors route-map out value. The value specifies the name of the route-map.
                                      (added in 1.1.0)
                                      send_community no
                                        Configures the BGP neighbors send-community value. If enabled then the BGP send-community value is enable. If disabled, then the BGP send-community value is disabled.
                                        (added in 1.1.0)

                                        Important

                                        Requires Arista EOS 4.13.7M or later with command API enable

                                        Important

                                        Requires Python Client for eAPI 0.3.1 or later

                                        Examples

                                        - name: add neighbor 172.16.10.1 to BGP
                                          eos_bgp_neighbor: name=172.16.10.1 enable=yes remote_as=65000
                                        
                                        - name: remove neighbor 172.16.10.1 to BGP
                                          eos_bgp_neighbor name=172.16.10.1 enable=yes remote_as=65000 state=absent
                                        

                                        Note

                                        All configuraiton is idempontent unless otherwise specified

                                        Note

                                        Supports eos metaparameters for using the eAPI transport

                                        Note

                                        Supports tateful resource configuration

                                        eos_bgp_network

                                        Synopsis

                                        Added in version 1.1.0

                                        This eos_bgp_network module provides stateful management of the network statements for the BGP routing process for Arista EOS nodes

                                        Options
                                        parameter required default choices comments
                                        masklen yes
                                          The IPv4 subnet mask length in bits. The value for the masklen must be in the valid range of 1 to 32.
                                          (added in 1.1.0)
                                          prefix yes
                                            The IPv4 prefix to configure as part of the network statement. The value must be a valid IPv4 prefix
                                            (added in 1.1.0)
                                            route_map no
                                              Configures the BGP route-map name to apply to the network statement when configured. Note this module does not create the route-map
                                              (added in 1.1.0)

                                              Important

                                              Requires Arista EOS 4.13.7M or later with command API enable

                                              Important

                                              Requires Python Client for eAPI 0.3.1 or later

                                              Examples

                                              - name: add network 172.16.10.0/26 with route-map test
                                                eos_bgp_network: prefix=172.16.10.0 masklen=26 route_map=test
                                              
                                              - name: remove network 172.16.0.0/8
                                                eos_bgp_network: prefix=172.16.0.0 masklen=8 state=absent
                                              

                                              Note

                                              All configuraiton is idempontent unless otherwise specified

                                              Note

                                              Supports eos metaparameters for using the eAPI transport

                                              Note

                                              Supports tateful resource configuration

                                              eos_command

                                              Synopsis

                                              Added in version 1.0.0

                                              The eos_command module provides a module for sending arbitray commands to the EOS node and returns the ouput. Only priviledged mode (enable) commands can be sent.

                                              Options
                                              parameter required default choices comments
                                              commands yes
                                                Specifies the list of commands to send to the node and execute in the configured mode. Mutliple commands can be sent to the node as a comma delimited set of values.
                                                (added in 1.0.0)
                                                encoding no json
                                                • json
                                                • text
                                                Specifies the requested encoding of the command output.
                                                (added in 1.2.0)

                                                Important

                                                Requires Arista EOS 4.13.7M or later with command API enabled

                                                Important

                                                Requires Python Client for eAPI 0.3.0 or later

                                                Examples

                                                - name: execute show version and show hostname
                                                  eos_command: commands='show version, show hostname'
                                                

                                                Note

                                                This module does not support idempotent operations.

                                                Note

                                                Supports eos metaparameters for using the eAPI transport

                                                Note

                                                This module does not support stateful configuration

                                                eos_config

                                                Synopsis

                                                Added in version 1.0.0

                                                The eos_config module evalues the current configuration for specific commands. If the commands are either present or absent (depending on the function argument, the eos_config module will configure the node using the command argument.

                                                Options
                                                parameter required default choices comments
                                                command yes
                                                  Specifies the configuration command to send to the node if the expression does not evalute to true.
                                                  (added in 1.0.0)
                                                  regexp no
                                                    Specifies the expression to evalute the current node's running configuration. The value can be any valid regular expression. This optional argument will default to use the command argument if none is provided.
                                                    (added in 1.1.0)
                                                    section no
                                                      Restricts the configuration evaluation to a single configuration section. If the configuration section argument is not provided, then the global configuration is used.
                                                      (added in 1.0.0)

                                                      Important

                                                      Requires Arista EOS 4.13.7M or later with command API enabled

                                                      Important

                                                      Requires Python Client for eAPI 0.3.0 or later

                                                      Examples

                                                      - name: idempotent operation for removing a SVI
                                                        eos_config:
                                                          command='no interface Vlan100'
                                                          regexp='interface Vlan100'
                                                          state=absent
                                                      
                                                      - name: non-idempotent operation for removing a SVI
                                                        eos_config:
                                                          command='no interface Vlan100'
                                                      
                                                      - name: ensure default route is present
                                                        eos_config:
                                                          command='ip route 0.0.0.0/0 192.168.1.254'
                                                      
                                                      - name: configure interface range to be shutdown if it isn't already
                                                        eos_config:
                                                          command='shutdown'
                                                          regexp='(?<=[^no ] )shutdown'
                                                          section='interface {{ item }}'
                                                        with_items:
                                                          - Ethernet1
                                                          - Ethernet2
                                                          - Ethernet3
                                                      

                                                      Note

                                                      This module does not support idempotent operations.

                                                      Note

                                                      Supports eos metaparameters for using the eAPI transport

                                                      Note

                                                      This module does not support stateful configuration

                                                      eos_ethernet

                                                      Synopsis

                                                      Added in version 1.0.0

                                                      The eos_ethernet module manages the interface configuration for physical Ethernet interfaces on EOS nodes.

                                                      Options
                                                      parameter required default choices comments
                                                      description no
                                                        Configures a one lne ASCII description for the interface. The EOS default value for description is None
                                                        (added in 1.0.0)
                                                        enable no True
                                                        • True
                                                        • False
                                                        Configures the administrative state for the interface. Setting the value to true will adminstrative enable the interface and setting the value to false will administratively disable the interface. The EOS default value for enable is true
                                                        (added in 1.0.0)
                                                        flowcontrol_receive no
                                                        • True
                                                        • False
                                                        Configures the flowcontrol receive value for the named Ethernet interface in EOS. If the value is configured true, then control receive is enabled (on). If the value is configured false then flowcontrol receive is disabled (off).
                                                        (added in 1.0.0)
                                                        flowcontrol_send no
                                                        • True
                                                        • False
                                                        Configures the flowcontrol send value for the named Ethernet interface in EOS. If the value is configured true, then control send is enabled (on). If the value is configured false then flowcontrol send is disabled (off).
                                                        (added in 1.0.0)
                                                        name yes
                                                          The unique interface identifier name. The interface name must use the full interface name (no abbreviated names). For example, interfaces should be specified as Ethernet1 not Et1
                                                          (added in 1.0.0)
                                                          sflow no
                                                            Configures the adminstrative state of running sflow on the named Ethernet interface. If this value is true, then sflow is enabled on the interface and if this value is false, then sflow is disabled on this interface. The EOS default value for sflow is true
                                                            (added in 1.0.0)

                                                            Important

                                                            Requires Arista EOS 4.13.7M or later with command API enabled

                                                            Important

                                                            Requires Python Client for eAPI 0.3.0 or later

                                                            Examples

                                                            - name: Ensure that Ethernet1/1 is administratively enabled
                                                              eos_ethernet: name=Ethernet1/1 enable=yes
                                                            
                                                            - name: Enable flowcontrol send and receive on Ethernet10
                                                              eos_ethernet: name=Ethernet10 flowcontrol_send=yes flowcontrol_receive=yes
                                                            

                                                            Note

                                                            All configuration is idempotent unless otherwise specified

                                                            Note

                                                            Supports eos metaparameters for using the eAPI transport

                                                            Note

                                                            Does not support stateful resource configuration.

                                                            eos_facts

                                                            Synopsis

                                                            Added in version 1.0.0

                                                            The eos_facts module collects facts from the EOS for use in Ansible playbooks. It can be used independently as well to discover what facts are availble from the node. This facts module does not cache any facts. If no configuration options are specified, then all facts are returned.

                                                            Options
                                                            parameter required default choices comments
                                                            exclude no
                                                              Specifies the list of facts to exclude when the fact module runs. The exclude list is comma delimited and, when configured, will not return the facts named in the exclude list. All other facts will be returned.
                                                              (added in 1.0.0)
                                                              include no
                                                                Specifies the list of facts to include when the fact module runs. The include list is comma delimited and, when included, will only return the facts named in the include list. All other facts will not be returned.
                                                                (added in 1.0.0)

                                                                Important

                                                                Requires Arista EOS 4.13.7M or later with command API enabled

                                                                Important

                                                                Requires Python Client for eAPI 0.3.0 or later

                                                                Examples

                                                                - name: collect all facts from node
                                                                  eos_facts:
                                                                
                                                                - name: include only a filtered set of facts returned
                                                                  eos_facts: include=interfaces
                                                                
                                                                - name: exclude a specific set of facts
                                                                  eos_facts: exclude=vlans
                                                                

                                                                Note

                                                                Supports eos metaparameters for using the eAPI transport

                                                                Note

                                                                The include and exclude options are mutually exclusive

                                                                eos_interface

                                                                Synopsis

                                                                Added in version 1.0.0

                                                                The eos_interface module manages the interface configuration for any valid interface on EOS nodes.

                                                                Options
                                                                parameter required default choices comments
                                                                description no
                                                                  Configures a one lne ASCII description for the interface. The EOS default value for description is None
                                                                  (added in 1.0.0)
                                                                  enable no True
                                                                  • True
                                                                  • False
                                                                  Configures the administrative state for the interface. Setting the value to true will adminstrative enable the interface and setting the value to false will administratively disable the interface. The EOS default value for enable is true
                                                                  (added in 1.0.0)
                                                                  name yes
                                                                    The unique interface identifier name. The interface name must use the full interface name (no abbreviated names). For example, interfaces should be specified as Ethernet1 not Et1
                                                                    (added in 1.0.0)

                                                                    Important

                                                                    Requires Arista EOS 4.13.7M or later with command API enabled

                                                                    Important

                                                                    Requires Python Client for eAPI 0.3.0 or later

                                                                    Examples

                                                                    - name: ensures the interface is configured
                                                                      eos_interface: name=Loopback0 state=present enable=yes
                                                                    
                                                                    - name: ensures the interface is not configured
                                                                      eos_interface: name=Loopback1 state=absent
                                                                    

                                                                    Note

                                                                    All configuration is idempotent unless otherwise specified

                                                                    Note

                                                                    Supports eos metaparameters for using the eAPI transport

                                                                    Note

                                                                    Supports stateful resource configuration. This method also supports the ‘default’ state. This will default the specified interface. Note however that the default state operation is NOT idempotent.

                                                                    eos_ipinterface

                                                                    Synopsis

                                                                    Added in version 1.0.0

                                                                    The eos_ipinterface module manages logical layer 3 interface configurations.

                                                                    Options
                                                                    parameter required default choices comments
                                                                    address no
                                                                      Configures the IPv4 address for the interface. The value must be in the form of A.B.C.D/E. The EOS default value for address is None
                                                                      (added in 1.0.0)
                                                                      mtu no
                                                                        Sets the IP interface MTU value. The MTU value defines the maximum transmission unit (or packet size) that can traverse the link. Valid values are in the range of 68 to 65535 bytes. The EOS default value for mtu is 1500
                                                                        (added in 1.0.0)
                                                                        name yes
                                                                          The unique interface identifier name. The interface name must use the full interface name (no abbreviated names). For example, interfaces should be specified as Ethernet1 not Et1
                                                                          (added in 1.0.0)

                                                                          Important

                                                                          Requires Arista EOS 4.13.7M or later with command API enabled

                                                                          Important

                                                                          Requires Python Client for eAPI 0.3.0 or later

                                                                          Examples

                                                                          - name: Ensure a logical IP interface is configured on Vlan100
                                                                            eos_ipinterface: name=Vlan100 state=present address=172.16.10.1/24
                                                                          
                                                                          - name: Ensure a logical IP interface is not configured on Ethernet1
                                                                            eos_ipinterface: name=Ethernet1 state=absent
                                                                          
                                                                          - name: Configure the MTU value on Port-Channel10
                                                                            eos_ipinterface: name=Port-Channel10 mtu=9000
                                                                          

                                                                          Note

                                                                          Currently this module only supports IPv4

                                                                          Note

                                                                          All configuration is idempotent unless otherwise specified

                                                                          Note

                                                                          Supports eos metaparameters for using the eAPI transport

                                                                          Note

                                                                          Supports stateful resource configuration.

                                                                          eos_mlag_config

                                                                          Synopsis

                                                                          Added in version 1.0.0

                                                                          The eos_mlag_interface module manages the MLAG interfaces on Arista EOS nodes. This module is fully stateful and all configuration of resources is idempotent unless otherwise specified.

                                                                          Options
                                                                          parameter required default choices comments
                                                                          domain_id no
                                                                            Configures the global MLAG domain-id value on the EOS node. The domain-id specifies the name the for MLAG domain. Valid values for domain-id is any ASCII string.
                                                                            (added in 1.0.0)
                                                                            local_interface no
                                                                              Configures the VLAN interface (SVI) for use as the MLAG endpoint for control traffic. Valid values for local-interface is any VLAN SVI identifier.
                                                                              (added in 1.0.0)
                                                                              peer_address no
                                                                                Configures the global MLAG peer-address of the MLAG peer. This peer address must be reachable by the configured local-interface. Valid values are any IPv4 unicast IP address.
                                                                                (added in 1.0.0)
                                                                                peer_link no
                                                                                  Configures the physical link that connects the local MLAG to its remote peer node. The physical link value can be any valid Ethernet or Port-Channel interface
                                                                                  (added in 1.0.0)
                                                                                  shutdown no
                                                                                  • True
                                                                                  • False
                                                                                  Configures the global MLAG administratively state. If the value of shutdown is true, then MLAG is administratively disabled. If the value of shutdown is false, then MALG is administratively enabled. The EOS default value for shutdown is false.
                                                                                  (added in 1.0.0)

                                                                                  Important

                                                                                  Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                  Important

                                                                                  Requires Python Client for eAPI 0.3.0 or later

                                                                                  Examples

                                                                                  - name: Ensure the MLAG domain-id is mlagPeer
                                                                                    eos_mlag_config: domain_id=mlagPeer
                                                                                  
                                                                                  - name: Configure the peer address and local interface
                                                                                    eos_mlag_config: peer_address=2.2.2.2 local_interface=Vlan4094
                                                                                  

                                                                                  Note

                                                                                  All configuration is idempotent unless otherwise specified

                                                                                  Note

                                                                                  Supports eos metaparameters for using the eAPI transport

                                                                                  Note

                                                                                  Does not support stateful resource configuration.

                                                                                  eos_mlag_interface

                                                                                  Synopsis

                                                                                  Added in version 1.0.0

                                                                                  The eos_mlag_interface module manages the MLAG interfaces on Arista EOS nodes. This module is fully stateful and all configuration of resources is idempotent unless otherwise specified.

                                                                                  Options
                                                                                  parameter required default choices comments
                                                                                  mlag_id no
                                                                                    Configures the interface mlag setting to the specified value. The mlag setting is any valid number from 1 to 2000. A MLAG identifier cannot be used on more than one interface.
                                                                                    (added in 1.0.0)
                                                                                    name yes
                                                                                      The interface name assocated with this resource. The interface name must be the full interface identifier. Valid interfaces match Po*
                                                                                      (added in 1.0.0)

                                                                                      Important

                                                                                      Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                      Important

                                                                                      Requires Python Client for eAPI 0.3.0 or later

                                                                                      Examples

                                                                                      - name: Ensure Ethernet1 is configured with mlag id 10
                                                                                        eos_mlag_interface: name=Ethernet1 state=present mlag_id=10
                                                                                      
                                                                                      - name: Ensure Ethernet10 is not configured as mlag
                                                                                        eos_mlag_interface: name=Ethernet10 state=absent
                                                                                      

                                                                                      Note

                                                                                      All configuration is idempotent unless otherwise specified

                                                                                      Note

                                                                                      Supports eos metaparameters for using the eAPI transport

                                                                                      Note

                                                                                      Supports stateful resource configuration.

                                                                                      eos_ping

                                                                                      Synopsis

                                                                                      Added in version 1.0.0

                                                                                      The eos_ping module will execute a network ping from the node and return the results. If the destination can be successfully pinged, then the module returns successfully. If any of the sent pings are not returned the module fails. By default, the error threshold is set to the same value as the number of pings sent

                                                                                      Options
                                                                                      parameter required default choices comments
                                                                                      count no 5
                                                                                        Configures the number of packets to send from the node to the remote dst. The default value is 5.
                                                                                        (added in 1.1.0)
                                                                                        dst yes
                                                                                          Specifies the destination IP address or FQDN for the network ping packet.
                                                                                          (added in 1.1.0)
                                                                                          error_threshold no
                                                                                            Configures the error threshold (in packet loss percentage) for the ping test to be considered failed. By default the value of the error_threshold is set to 0. Valid values between 0 and 100.
                                                                                            (added in 1.1.0)
                                                                                            source no
                                                                                              Configures the source interface for the network ping packet
                                                                                              (added in 1.1.0)

                                                                                              Important

                                                                                              Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                              Important

                                                                                              Requires Python Client for eAPI 0.4.0 or later

                                                                                              Examples

                                                                                              - eos_ping: dst=192.168.1.254 count=10
                                                                                              
                                                                                              # Set the error_threshold to 50% packet loss
                                                                                              - eos_ping: dst=192.168.1.254 count=10 error_threshold=50
                                                                                              

                                                                                              Note

                                                                                              Important fixes to this module were made in pyeapi 0.4.0. Be sure to update to at least that version.

                                                                                              Note

                                                                                              All configuration is idempotent unless otherwise specified

                                                                                              Note

                                                                                              Supports eos metaparameters for using the eAPI transport

                                                                                              Note

                                                                                              Does not support stateful resource configuration.

                                                                                              eos_portchannel

                                                                                              Synopsis

                                                                                              Added in version 1.0.0

                                                                                              The eos_portchannel module manages the interface configuration for logical Port-Channel interfaces on EOS nodes.

                                                                                              Options
                                                                                              parameter required default choices comments
                                                                                              description no
                                                                                                Configures a one lne ASCII description for the interface. The EOS default value for description is None
                                                                                                (added in 1.0.0)
                                                                                                enable no True
                                                                                                • True
                                                                                                • False
                                                                                                Configures the administrative state for the interface. Setting the value to true will adminstrative enable the interface and setting the value to false will administratively disable the interface. The EOS default value for enable is true
                                                                                                (added in 1.0.0)
                                                                                                lacp_mode no
                                                                                                • active
                                                                                                • passive
                                                                                                • disabled
                                                                                                Configures the LACP mode configured on the named interface. The LACP mode identifies the negotiation protocol used between peers.
                                                                                                (added in 1.0.0)
                                                                                                members no
                                                                                                  Configures the set of physical Ethernet interfaces that are bundled together to create the logical Port-Channel interface. Member interface names should be a comma separated list of physical Ethernet interface names to be included in the named interface.
                                                                                                  (added in 1.0.0)
                                                                                                  minimum_links no
                                                                                                    Conifugres the minimum links value which specifies the miniumum number of physical Ethernet interfaces that must be operationally up for the entire Port-Channel interface to be considered operationally up. Valid values for minimum links are in the range of 0 to 16. The EOS default value for min-links is 0
                                                                                                    (added in 1.0.0)
                                                                                                    name yes
                                                                                                      The unique interface identifier name. The interface name must use the full interface name (no abbreviated names). For example, interfaces should be specified as Ethernet1 not Et1
                                                                                                      (added in 1.0.0)

                                                                                                      Important

                                                                                                      Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                      Important

                                                                                                      Requires Python Client for eAPI 0.3.0 or later

                                                                                                      Examples

                                                                                                      - name: Ensure Port-Channel1 has members Ethernet1 and 2
                                                                                                        eos_portchannel: name=Port-Channel1 members=Ethernet1,Ethernet2
                                                                                                      
                                                                                                      - name: Ensure Port-Channel10 uses lacp mode active
                                                                                                        eos_portchannel: name=Port-Channel10 members=Ethernet1,Ethernet3
                                                                                                                         lacp_mode=active
                                                                                                      

                                                                                                      Note

                                                                                                      All configuration is idempotent unless otherwise specified

                                                                                                      Note

                                                                                                      Supports eos metaparameters for using the eAPI transport

                                                                                                      Note

                                                                                                      Supports stateful resource configuration.

                                                                                                      eos_purge

                                                                                                      Synopsis

                                                                                                      Added in version 1.0.0

                                                                                                      The eos_purge module will scan the current nodes running-configuration and purge resources of a specified type if the resource is not explicitly configured in the playbook. This module will allow a playbook task to dynamically determine which resources should be removed from the nodes running-configuration based on the playbook. Note Purge is not supported for all EOS modules

                                                                                                      Options
                                                                                                      parameter required default choices comments
                                                                                                      resource yes
                                                                                                        The name of the resource module to purge from the configuration. If the provided resource name does not support purge, the module will simply exit with an error message.
                                                                                                        (added in 1.0.0)
                                                                                                        results yes
                                                                                                          The results argument is used to store the output from a previous module run. Using the output from the module run allows the purge function to filter which resources should be removed. See the Examples for more
                                                                                                          (added in 1.0.0)

                                                                                                          Important

                                                                                                          Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                          Important

                                                                                                          Requires Python Client for eAPI 0.3.0 or later

                                                                                                          Examples

                                                                                                          # configure the set of vlans for the node
                                                                                                          
                                                                                                          - name: configure vlans
                                                                                                            eos_vlan: vlanid={{ item }}
                                                                                                            with_items: ['1', '10', '11', '12', '13', '14', '15']
                                                                                                            register: required_vlans
                                                                                                          
                                                                                                          
                                                                                                          # note the value for results is the registered vlan variable.  Also of
                                                                                                          # importance is the to_nice_json filter which is required
                                                                                                          
                                                                                                          - name: purge vlans not on the list
                                                                                                            eos_purge: resource=eos_vlan results='{{ required_vlans|to_nice_json }}'
                                                                                                          

                                                                                                          Note

                                                                                                          All configuration is idempotent unless otherwise specified

                                                                                                          Note

                                                                                                          Supports eos metaparameters for using the eAPI transport

                                                                                                          Note

                                                                                                          Does not support stateful resource configuration.

                                                                                                          eos_routemap

                                                                                                          Synopsis

                                                                                                          Added in version 1.2.0

                                                                                                          This module will manage routemap entries on EOS nodes

                                                                                                          Options
                                                                                                          parameter required default choices comments
                                                                                                          action yes permit
                                                                                                          • permit
                                                                                                          • deny
                                                                                                          The action associated with the routemap name.
                                                                                                          (added in 1.2.0)
                                                                                                          continue no
                                                                                                            The statement defines the next routemap clause to evaluate.
                                                                                                            (added in 1.2.0)
                                                                                                            description no
                                                                                                              The description for this routemap entry.
                                                                                                              (added in 1.2.0)
                                                                                                              match no
                                                                                                                The list of match statements that define the routemap entry. The match statements should be a comma separated list of match statements without the word match at the beginning of the string. See the example below for more information.
                                                                                                                (added in 1.2.0)
                                                                                                                name yes
                                                                                                                  The name of the routemap to manage.
                                                                                                                  (added in 1.2.0)
                                                                                                                  seqno yes
                                                                                                                    The sequence number of the rule that this entry corresponds to.
                                                                                                                    (added in 1.2.0)
                                                                                                                    set no
                                                                                                                      The list of set statements that define the routemap entry. The set statements should be a comma separated list of set statements without the word set at the beginning of the string. See the example below for more information.
                                                                                                                      (added in 1.2.0)

                                                                                                                      Important

                                                                                                                      Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                      Important

                                                                                                                      Requires Python Client for eAPI 0.4.0 or later

                                                                                                                      Examples

                                                                                                                      - eos_routemap: name=rm1 action=permit seqno=10
                                                                                                                                      description='this is a great routemap'
                                                                                                                                      match='as 50,interface Ethernet2'
                                                                                                                                      set='tag 100,weight 1000'
                                                                                                                                      continue=20
                                                                                                                      

                                                                                                                      Note

                                                                                                                      All configuration is idempotent unless otherwise specified

                                                                                                                      Note

                                                                                                                      Supports eos metaparameters for using the eAPI transport

                                                                                                                      Note

                                                                                                                      Supports stateful resource configuration.

                                                                                                                      eos_staticroute

                                                                                                                      Synopsis

                                                                                                                      Added in version 1.2.0

                                                                                                                      The eos_staticroute module manages static route configuration options on Arista EOS nodes.

                                                                                                                      Options
                                                                                                                      parameter required default choices comments
                                                                                                                      distance no 1
                                                                                                                        Distance designated for this route
                                                                                                                        (added in 1.2.0)
                                                                                                                        ip_dest yes
                                                                                                                          Destination IP address
                                                                                                                          (added in 1.2.0)
                                                                                                                          next_hop yes
                                                                                                                            Next hop IP address or egress interface
                                                                                                                            (added in 1.2.0)
                                                                                                                            next_hop_ip no
                                                                                                                              IP address of the next router. Only valid when next_hop is an egress interface
                                                                                                                              (added in 1.2.0)
                                                                                                                              route_name no
                                                                                                                                Descriptive name for the route
                                                                                                                                (added in 1.2.0)
                                                                                                                                tag no
                                                                                                                                  Tag assigned for the route
                                                                                                                                  (added in 1.2.0)

                                                                                                                                  Important

                                                                                                                                  Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                  Important

                                                                                                                                  Requires Python Client for eAPI 0.4.0 or later

                                                                                                                                  Examples

                                                                                                                                  - eos_staticroute: ip_dest=1.1.1.0/24 next_hop=Ethernet1
                                                                                                                                                     next_hop_ip=1.1.1.1 distance=1
                                                                                                                                                     tag=15 name=route1
                                                                                                                                  

                                                                                                                                  Note

                                                                                                                                  All configuration is idempotent unless otherwise specified

                                                                                                                                  Note

                                                                                                                                  Supports eos metaparameters for using the eAPI transport

                                                                                                                                  Note

                                                                                                                                  Supports stateful resource configuration.

                                                                                                                                  eos_stp_interface

                                                                                                                                  Synopsis

                                                                                                                                  Added in version 1.0.0

                                                                                                                                  Provides active state management of STP interface configuration on Arista EOS nodes.

                                                                                                                                  Options
                                                                                                                                  parameter required default choices comments
                                                                                                                                  bpduguard no
                                                                                                                                  • True
                                                                                                                                  • False
                                                                                                                                  Specifies whether or not bpduguard should be enabled on the named interface. If this value is configured true, then bpduguard is enabled on the interface. If this value is configured false, then bpduguard is disabled on the interface. The EOS default value for bpduguard is false
                                                                                                                                  (added in 1.0.0)
                                                                                                                                  name yes
                                                                                                                                    The unique interface identifier name. The interface name must use the full interface name (no abbreviated names). For example, interfaces should be specified as Ethernet1 not Et1
                                                                                                                                    (added in 1.0.0)
                                                                                                                                    portfast no
                                                                                                                                    • True
                                                                                                                                    • False
                                                                                                                                    Specifies whether or not portfast should be enabled on the named interface. If this value is configured true, then portfast is enabled on the interface. If this value is configured false, then portfast is disabled on the interface. The EOS default value for portfast is false
                                                                                                                                    (added in 1.0.0)
                                                                                                                                    portfast_type no
                                                                                                                                    • edge
                                                                                                                                    • network
                                                                                                                                    Configures the portfast port type value for the named interface in EOS. Valid port types include edge or network.
                                                                                                                                    (added in 1.0.0)

                                                                                                                                    Important

                                                                                                                                    Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                    Important

                                                                                                                                    Requires Python Client for eAPI 0.3.0 or later

                                                                                                                                    Examples

                                                                                                                                    - name: Ensure portfast is enabled on Ethernet3
                                                                                                                                      eos_stp_interface: name=Ethernet3 portfast=yes
                                                                                                                                    
                                                                                                                                    - name: Ensure bpduguard is enabled on Ethernet49
                                                                                                                                      eos_stp_interface: name=Ethernet49 bpduguard=yes
                                                                                                                                    

                                                                                                                                    Note

                                                                                                                                    All configuration is idempotent unless otherwise specified

                                                                                                                                    Note

                                                                                                                                    Supports eos metaparameters for using the eAPI transport

                                                                                                                                    Note

                                                                                                                                    Does not support stateful resource configuration.

                                                                                                                                    eos_switchport

                                                                                                                                    Synopsis

                                                                                                                                    Added in version 1.0.0

                                                                                                                                    Provides active state management of switchport (layer 2) interface configuration in Arista EOS. Logical switchports are mutually exclusive with eos_ipinterface.

                                                                                                                                    Options
                                                                                                                                    parameter required default choices comments
                                                                                                                                    access_vlan no
                                                                                                                                      Configures the VLAN associated with a switchport that is configured to use 'access' mode. This parameter only takes effect if mode is equal to 'access'. Valid values for access vlan are in the range of 1 to 4094. The EOS default value for access vlan is 1
                                                                                                                                      (added in 1.0.0)
                                                                                                                                      mode no
                                                                                                                                      • trunk
                                                                                                                                      • access
                                                                                                                                      Identifies the mode of operation for the interface. Switchport interfaces can act as trunk interfaces (carrying multiple VLANs) or as access interfaces (attached to a single VLAN). The EOS default value is 'access'
                                                                                                                                      (added in 1.0.0)
                                                                                                                                      name yes
                                                                                                                                        The unique interface identifier name. The interface name must use the full interface name (no abbreviated names). For example, interfaces should be specified as Ethernet1 not Et1
                                                                                                                                        (added in 1.0.0)
                                                                                                                                        trunk_allowed_vlans no
                                                                                                                                          Configures the set of VLANs that are allowed to traverse this switchport interface. This parameter only takes effect if the mode is configured to 'trunk'. This parameter accepts a comma delimited list of VLAN IDs to configure on the trunk port. Each VLAN ID must be in the valid range of 1 to 4094. The EOS default value for trunk allowed vlans is 1-4094.
                                                                                                                                          (added in 1.0.0)
                                                                                                                                          trunk_groups no
                                                                                                                                            Configures the list of trunk groups on the switchport. The parameter accepts a comma separated list of values to be provisioned on the interface.
                                                                                                                                            (added in 1.1.0)
                                                                                                                                            trunk_native_vlan no
                                                                                                                                              Configures the native VLAN on a trunk interface for untagged packets entering the switchport. This parameter only takes effect if mode is equal to 'trunk'. Valid values for trunk native vlan are in the range of 1 to 4094. The EOS default value for trunk native value is 1.
                                                                                                                                              (added in 1.0.0)

                                                                                                                                              Important

                                                                                                                                              Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                              Important

                                                                                                                                              Requires Python Client for eAPI 0.3.0 or later

                                                                                                                                              Examples

                                                                                                                                              - name: Ensure Ethernet1 is an access port
                                                                                                                                                eos_switchport: name=Ethernet1 mode=access access_vlan=10
                                                                                                                                              
                                                                                                                                              - name: Ensure Ethernet12 is a trunk port
                                                                                                                                                eos_switchport: name=Ethernet12 mode=trunk trunk_native_vlan=100
                                                                                                                                              
                                                                                                                                              - name: Add the set of allowed vlans to Ethernet2/1
                                                                                                                                                eos_switchport: name=Ethernet2/1 mode=trunk trunk_allowed_vlans=1,10,100
                                                                                                                                              
                                                                                                                                              - name: Add trunk group values to an interface
                                                                                                                                                eos_switchport: name=Ethernet5 trunk_groups=foo,bar,baz
                                                                                                                                              

                                                                                                                                              Note

                                                                                                                                              All configuration is idempotent unless otherwise specified

                                                                                                                                              Note

                                                                                                                                              Supports eos metaparameters for using the eAPI transport

                                                                                                                                              Note

                                                                                                                                              Supports stateful resource configuration.

                                                                                                                                              eos_system

                                                                                                                                              Synopsis

                                                                                                                                              Added in version 1.0.0

                                                                                                                                              The eos_system module manages global system configuration options on Arista EOS nodes.

                                                                                                                                              Options
                                                                                                                                              parameter required default choices comments
                                                                                                                                              hostname no
                                                                                                                                                The ASCII string to use to configure the hostname value in the nodes current running-configuration. The EOS default value for hostname is 'localhost'
                                                                                                                                                (added in 1.0.0)
                                                                                                                                                ip_routing no
                                                                                                                                                • true
                                                                                                                                                • false
                                                                                                                                                Configures the state of IPv4 'ip routing' on the switch. By default EOS switches come up with 'no ip routing'. This attribute requires pyeapi version 0.4.0.
                                                                                                                                                (added in 1.2.0)

                                                                                                                                                Important

                                                                                                                                                Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                                Important

                                                                                                                                                Requires Python Client for eAPI 0.3.0 or later

                                                                                                                                                Examples

                                                                                                                                                - name: configures the hostname to spine01
                                                                                                                                                  eos_system: hostname=spine01
                                                                                                                                                

                                                                                                                                                Note

                                                                                                                                                All configuration is idempotent unless otherwise specified

                                                                                                                                                Note

                                                                                                                                                Supports eos metaparameters for using the eAPI transport

                                                                                                                                                Note

                                                                                                                                                Supports stateful resource configuration.

                                                                                                                                                eos_user

                                                                                                                                                Synopsis

                                                                                                                                                Added in version 1.2.0

                                                                                                                                                The eos_user module helps manage CLI users on your Arista nodes. You can create, delete and modify users along with their passwords.

                                                                                                                                                Options
                                                                                                                                                parameter required default choices comments
                                                                                                                                                encryption no
                                                                                                                                                • md5
                                                                                                                                                • sha512
                                                                                                                                                Defines the encryption format of the password provided in the corresponding secret key. Note that cleartext passwords are allowed via manual CLI user creation but are not supported in this module due to security concerns and idempotency.
                                                                                                                                                (added in 1.2.0)
                                                                                                                                                name yes
                                                                                                                                                  The unique username. The username must adhere to certain format guidelines. Valid usernames begin with A-Z, a-z, or 0-9 and may also contain any of these characters: @#$%^&*-_= +;<>,.~|
                                                                                                                                                  (added in 1.2.0)
                                                                                                                                                  nopassword no
                                                                                                                                                  • True
                                                                                                                                                  • False
                                                                                                                                                  The nopassword key is used to create a user with no password assigned. This attribute is mutually exclusive with secret and encryption.
                                                                                                                                                  (added in 1.2.0)
                                                                                                                                                  privilege no
                                                                                                                                                    Configures the privilege level for the user. Permitted values are integers between 0 and 15. The EOS default privilege is 1.
                                                                                                                                                    (added in 1.2.0)
                                                                                                                                                    role no
                                                                                                                                                      Configures the role assigned to the user. The EOS default for this attribute is managed with aaa authorization policy local default-role; this is typically the network-operator role.
                                                                                                                                                      (added in 1.2.0)
                                                                                                                                                      secret no
                                                                                                                                                        This key is used in conjunction with encryption. The value should be a hashed password that was previously generated.
                                                                                                                                                        (added in 1.2.0)
                                                                                                                                                        sshkey no
                                                                                                                                                          Configures an sshkey for the CLI user. This sshkey will end up in /home/USER/.ssh/authorized_keys. Typically this is the public key from the client SSH node.
                                                                                                                                                          (added in 1.2.0)

                                                                                                                                                          Important

                                                                                                                                                          Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                                          Important

                                                                                                                                                          Requires Python Client for eAPI 0.4.0 or later

                                                                                                                                                          Important

                                                                                                                                                          Requires Cleartext passwords are not accepted in playbooks

                                                                                                                                                          Examples

                                                                                                                                                          - name: Create simple user with no assigned password
                                                                                                                                                            eos_user: name=simpletom nopassword=true
                                                                                                                                                          
                                                                                                                                                          - name: Create user with MD5 password
                                                                                                                                                            eos_user: name=securetom encryption=md5
                                                                                                                                                                      secret=$1$J0auuPhz$Pkr5NnHssW.Jqlk17Ylpk0
                                                                                                                                                          
                                                                                                                                                          - name: Create user with SHA512 password (passwd truncated in eg)
                                                                                                                                                            eos_user: name=securetom encryption=sha512
                                                                                                                                                                      secret=$6$somesalt$rkDq7Az4Efjo
                                                                                                                                                          
                                                                                                                                                          - name: Remove user
                                                                                                                                                            eos_user: name=securetom state=absent
                                                                                                                                                          
                                                                                                                                                          - name: Create user with privilege level 10
                                                                                                                                                            eos_user: name=securetom encryption=sha512
                                                                                                                                                                      secret=$6$somesalt$rkDq7Az4Efjo
                                                                                                                                                                      privilege=10
                                                                                                                                                          
                                                                                                                                                          - name: Create user with role network-admin
                                                                                                                                                            eos_user: name=securetom encryption=sha512
                                                                                                                                                                      secret=$6$somesalt$rkDq7Az4Efjo
                                                                                                                                                                      privilege=10 role=network-admin
                                                                                                                                                          
                                                                                                                                                          - name: Add an SSH key with a user no password
                                                                                                                                                            eos_user: name=sshkeytom nopassword=true
                                                                                                                                                                      sshkey='ssh-rsa somesshkey'
                                                                                                                                                          
                                                                                                                                                          - name: Remove SSH key with a user no password
                                                                                                                                                            eos_user: name=sshkeytom nopassword=true
                                                                                                                                                                      sshkey=''
                                                                                                                                                          

                                                                                                                                                          Note

                                                                                                                                                          All configuration is idempotent unless otherwise specified

                                                                                                                                                          Note

                                                                                                                                                          Supports eos metaparameters for using the eAPI transport

                                                                                                                                                          Note

                                                                                                                                                          Supports stateful resource configuration.

                                                                                                                                                          eos_varp

                                                                                                                                                          Synopsis

                                                                                                                                                          Added in version 1.2.0

                                                                                                                                                          This module will manage global Varp configuration on EOS nodes

                                                                                                                                                          Options
                                                                                                                                                          parameter required default choices comments
                                                                                                                                                          mac_address yes
                                                                                                                                                            The MAC address to assign as the virtual-router mac address. This value must be formatted like aa:bb:cc:dd:ee:ff
                                                                                                                                                            (added in 1.2.0)

                                                                                                                                                            Important

                                                                                                                                                            Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                                            Important

                                                                                                                                                            Requires Python Client for eAPI 0.4.0 or later

                                                                                                                                                            Examples

                                                                                                                                                            - eos_varp: mac_address='00:11:22:33:44:55'
                                                                                                                                                            

                                                                                                                                                            Note

                                                                                                                                                            All configuration is idempotent unless otherwise specified

                                                                                                                                                            Note

                                                                                                                                                            Supports eos metaparameters for using the eAPI transport

                                                                                                                                                            Note

                                                                                                                                                            Does not support stateful resource configuration.

                                                                                                                                                            eos_varp_interface

                                                                                                                                                            Synopsis

                                                                                                                                                            Added in version 1.2.0

                                                                                                                                                            This module will manage interface Varp configuration on EOS nodes. Typically this includes Vlan interfaces only by using the ip virtual-router address command.

                                                                                                                                                            Options
                                                                                                                                                            parameter required default choices comments
                                                                                                                                                            name yes
                                                                                                                                                              The Varp interface which will have the following shared_ip's configured. These are typically Vlan interfaces. The interface name must match the way it is written in the configuration. For example, use Vlan100, not vlan100 or vlan 100.
                                                                                                                                                              (added in 1.2.0)
                                                                                                                                                              shared_ip yes
                                                                                                                                                                The list of IP addresses that will be shared in the Varp configuration. The list of IPs should be a string of comma-separated addresses. Please provide a list of sorted IPs.
                                                                                                                                                                (added in 1.2.0)

                                                                                                                                                                Important

                                                                                                                                                                Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                                                Important

                                                                                                                                                                Requires Python Client for eAPI 0.4.0 or later

                                                                                                                                                                Examples

                                                                                                                                                                - eos_varp_interface: name=Vlan1000 shared_ip='1.1.1.2,1.1.1.3,1.1.1.4'
                                                                                                                                                                

                                                                                                                                                                Note

                                                                                                                                                                All configuration is idempotent unless otherwise specified

                                                                                                                                                                Note

                                                                                                                                                                Supports eos metaparameters for using the eAPI transport

                                                                                                                                                                Note

                                                                                                                                                                Does not support stateful resource configuration.

                                                                                                                                                                eos_vlan

                                                                                                                                                                Synopsis

                                                                                                                                                                Added in version 1.0.0

                                                                                                                                                                The eos_vlan module manages VLAN configurations on Arista EOS nodes.

                                                                                                                                                                Options
                                                                                                                                                                parameter required default choices comments
                                                                                                                                                                enable no True
                                                                                                                                                                • True
                                                                                                                                                                • False
                                                                                                                                                                Configures the administrative state for the VLAN. If enable is True then the VLAN is administratively enabled. If enable is False then the VLAN is administratively disabled.
                                                                                                                                                                (added in 1.0.0)
                                                                                                                                                                name no
                                                                                                                                                                  An ASCII string identifer for this VLAN. The default value for the VLAN name is VLANxxxx where xxxx is the four digit VLAN ID.
                                                                                                                                                                  (added in 1.0.0)
                                                                                                                                                                  trunk_groups no
                                                                                                                                                                    Configures the list of trunk groups associated with the VLAN in the node configuration. The list of trunk groups is a comma separated list. The default value for trunk_groups is an empty list.
                                                                                                                                                                    Note: The list of comma delimited values must not include spaces.
                                                                                                                                                                    (added in 1.0.0)
                                                                                                                                                                    vlanid yes
                                                                                                                                                                      The unique VLAN identifier associated with this resource. The value for this identiifer must be in the range of 1 to 4094.
                                                                                                                                                                      (added in 1.0.0)

                                                                                                                                                                      Important

                                                                                                                                                                      Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                                                      Important

                                                                                                                                                                      Requires Python Client for eAPI 0.3.0 or later

                                                                                                                                                                      Examples

                                                                                                                                                                      - name: ensures vlan 100 is configured
                                                                                                                                                                        eos_vlan: vlanid=100 state=present
                                                                                                                                                                      
                                                                                                                                                                      - name: ensures vlan 200 is not configured
                                                                                                                                                                        eos_vlan: vlanid=200 state=absent
                                                                                                                                                                      
                                                                                                                                                                      - name: configures the vlan name
                                                                                                                                                                        eos_vlan: vlanid=1 name=TEST_VLAN_1
                                                                                                                                                                      
                                                                                                                                                                      - name: configure trunk groups for vlan 10
                                                                                                                                                                        eos_vlan: vlanid=10 trunk_groups=tg1,tg2,tg3
                                                                                                                                                                      

                                                                                                                                                                      Note

                                                                                                                                                                      All configuration is idempotent unless otherwise specified

                                                                                                                                                                      Note

                                                                                                                                                                      Supports eos metaparameters for using the eAPI transport

                                                                                                                                                                      Note

                                                                                                                                                                      Supports stateful resource configuration.

                                                                                                                                                                      eos_vrrp

                                                                                                                                                                      Synopsis

                                                                                                                                                                      Added in version 1.2.0

                                                                                                                                                                      This module will manage VRRP configurations on EOS nodes

                                                                                                                                                                      Options
                                                                                                                                                                      parameter required default choices comments
                                                                                                                                                                      delay_reload no
                                                                                                                                                                        Delay between switch reload and VRRP initialization
                                                                                                                                                                        (added in 1.2.0)
                                                                                                                                                                        description no
                                                                                                                                                                          Text description of the virtual router
                                                                                                                                                                          (added in 1.2.0)
                                                                                                                                                                          enable no True
                                                                                                                                                                          • True
                                                                                                                                                                          • False
                                                                                                                                                                          The state of the VRRP
                                                                                                                                                                          (added in 1.2.0)
                                                                                                                                                                          interface yes
                                                                                                                                                                            The interface on which the VRRP is configured
                                                                                                                                                                            (added in 1.2.0)
                                                                                                                                                                            ip_version no 2
                                                                                                                                                                            • 2
                                                                                                                                                                            • 3
                                                                                                                                                                            VRRP version in place on the virtual router
                                                                                                                                                                            (added in 1.2.0)
                                                                                                                                                                            mac_addr_adv_interval no 30
                                                                                                                                                                              Interval between advertisement messages to virtual router group
                                                                                                                                                                              (added in 1.2.0)
                                                                                                                                                                              preempt no True
                                                                                                                                                                              • True
                                                                                                                                                                              • False
                                                                                                                                                                              Preempt mode setting for the virtual router
                                                                                                                                                                              (added in 1.2.0)
                                                                                                                                                                              preempt_delay_min no
                                                                                                                                                                                Interval between a preempt event and takeover
                                                                                                                                                                                (added in 1.2.0)
                                                                                                                                                                                preempt_delay_reload no
                                                                                                                                                                                  Interval between a preempt event and takeover after reload
                                                                                                                                                                                  (added in 1.2.0)
                                                                                                                                                                                  primary_ip no 0.0.0.0
                                                                                                                                                                                    The ip address of the virtual router
                                                                                                                                                                                    (added in 1.2.0)
                                                                                                                                                                                    priority no 100
                                                                                                                                                                                      The priority setting for the virtual router
                                                                                                                                                                                      (added in 1.2.0)
                                                                                                                                                                                      secondary_ip no
                                                                                                                                                                                        Array of secondary ip addresses assigned to the VRRP
                                                                                                                                                                                        (added in 1.2.0)
                                                                                                                                                                                        timers_advertise no 1
                                                                                                                                                                                          Interval between advertisement messages to virtual router group
                                                                                                                                                                                          (added in 1.2.0)
                                                                                                                                                                                          track no
                                                                                                                                                                                            Array of track definitions to be assigned to the vrrp
                                                                                                                                                                                            (added in 1.2.0)
                                                                                                                                                                                            vrid yes
                                                                                                                                                                                              The unique identifying ID of the VRRP on its interface
                                                                                                                                                                                              (added in 1.2.0)

                                                                                                                                                                                              Important

                                                                                                                                                                                              Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                                                                              Important

                                                                                                                                                                                              Requires Python Client for eAPI 0.4.0 or later

                                                                                                                                                                                              Examples

                                                                                                                                                                                              # Configure the set of tracked objects for the VRRP
                                                                                                                                                                                              # Create a list of dictionaries, where name is the object to be
                                                                                                                                                                                              # tracked, action is shutdown or decrement, and amount is the
                                                                                                                                                                                              # decrement amount. Amount is not specified when action is shutdown.
                                                                                                                                                                                              
                                                                                                                                                                                              vars:
                                                                                                                                                                                                tracks:
                                                                                                                                                                                                    - name: Ethernet1
                                                                                                                                                                                                      action: shutdown
                                                                                                                                                                                                    - name: Ethernet2
                                                                                                                                                                                                      action: decrement
                                                                                                                                                                                                      amount: 5
                                                                                                                                                                                              
                                                                                                                                                                                              # Setup the VRRP
                                                                                                                                                                                              
                                                                                                                                                                                                - eos_vrrp:
                                                                                                                                                                                                    interface=Vlan70
                                                                                                                                                                                                    vrid=10
                                                                                                                                                                                                    enable=True
                                                                                                                                                                                                    primary_ip=10.10.10.1
                                                                                                                                                                                                    priority=50
                                                                                                                                                                                                    description='vrrp 10 on Vlan70'
                                                                                                                                                                                                    ip_version=2
                                                                                                                                                                                                    secondary_ip=['10.10.10.70','10.10.10.80']
                                                                                                                                                                                                    timers_advertise=15
                                                                                                                                                                                                    preempt=True
                                                                                                                                                                                                    preempt_delay_min=30
                                                                                                                                                                                                    preempt_delay_reload=30
                                                                                                                                                                                                    delay_reload=30
                                                                                                                                                                                                    track="{{ tracks }}"
                                                                                                                                                                                              

                                                                                                                                                                                              Note

                                                                                                                                                                                              All configuration is idempotent unless otherwise specified

                                                                                                                                                                                              Note

                                                                                                                                                                                              Supports eos metaparameters for using the eAPI transport

                                                                                                                                                                                              Note

                                                                                                                                                                                              Supports stateful resource configuration.

                                                                                                                                                                                              eos_vxlan

                                                                                                                                                                                              Synopsis

                                                                                                                                                                                              Added in version 1.0.0

                                                                                                                                                                                              The eos_vxlan module manages the logical VxLAN interface configuration on Arista EOS nodes.

                                                                                                                                                                                              Options
                                                                                                                                                                                              parameter required default choices comments
                                                                                                                                                                                              description no
                                                                                                                                                                                                Configures a one lne ASCII description for the interface. The EOS default value for description is None
                                                                                                                                                                                                (added in 1.0.0)
                                                                                                                                                                                                enable no True
                                                                                                                                                                                                • True
                                                                                                                                                                                                • False
                                                                                                                                                                                                Configures the administrative state for the interface. Setting the value to true will adminstrative enable the interface and setting the value to false will administratively disable the interface. The EOS default value for enable is true
                                                                                                                                                                                                (added in 1.0.0)
                                                                                                                                                                                                multicast_group no
                                                                                                                                                                                                  Configures the vxlan multicast-group address used for flooding traffic between VTEPs. This value must be a valid multicast address in the range of 224/8. The EOS default value for vxlan multicast-group is None.
                                                                                                                                                                                                  (added in 1.0.0)
                                                                                                                                                                                                  name yes
                                                                                                                                                                                                    The unique interface identifier name. The interface name must use the full interface name (no abbreviated names). For example, interfaces should be specified as Ethernet1 not Et1
                                                                                                                                                                                                    Note: The name parameter only accepts Vxlan1 as the identifier
                                                                                                                                                                                                    (added in 1.0.0)
                                                                                                                                                                                                    source_interface no
                                                                                                                                                                                                      Configures the vxlan source-interface value which directs the interface to use the specified source interface address to source messages from. The configured value must be a Loopback interface. The EOS default value for source interface is None.
                                                                                                                                                                                                      (added in 1.0.0)
                                                                                                                                                                                                      udp_port no
                                                                                                                                                                                                        Configures the vxlan udp-port value used to terminate mutlicast messages between VTEPs. This value must be an integer in the range of 1024 to 65535. The EOS default value for vxlan udp-port is 4789.
                                                                                                                                                                                                        (added in 1.0.0)

                                                                                                                                                                                                        Important

                                                                                                                                                                                                        Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                                                                                        Important

                                                                                                                                                                                                        Requires Python Client for eAPI 0.3.0 or later

                                                                                                                                                                                                        Examples

                                                                                                                                                                                                        - name: ensures the vxlan interface is configured
                                                                                                                                                                                                          eos_vxlan: name=Vxlan1 state=present enable=yes
                                                                                                                                                                                                        
                                                                                                                                                                                                        - name: ensures the vxlan interface is not configured
                                                                                                                                                                                                          eos_vxlan: name=Vxlan1 state=absent
                                                                                                                                                                                                        
                                                                                                                                                                                                        - name: configures the vxlan source interface
                                                                                                                                                                                                          eos_vxlan: name=Vxlan1 source_interface=Loopback0
                                                                                                                                                                                                        

                                                                                                                                                                                                        Note

                                                                                                                                                                                                        All configuration is idempotent unless otherwise specified

                                                                                                                                                                                                        Note

                                                                                                                                                                                                        Supports eos metaparameters for using the eAPI transport

                                                                                                                                                                                                        Note

                                                                                                                                                                                                        Supports stateful resource configuration.

                                                                                                                                                                                                        eos_vxlan_vlan

                                                                                                                                                                                                        Synopsis

                                                                                                                                                                                                        Added in version 1.0.0

                                                                                                                                                                                                        The eos_vxlan_vlan module manages the Vxlan VLAN to VNI mappings for an Arista EOS node that is operating as a VTEP

                                                                                                                                                                                                        Options
                                                                                                                                                                                                        parameter required default choices comments
                                                                                                                                                                                                        name yes
                                                                                                                                                                                                          The unique interface identifier name. The interface name must use the full interface name (no abbreviated names). For example, interfaces should be specified as Ethernet1 not Et1
                                                                                                                                                                                                          Note: The name parameter only accepts Vxlan1 as the identifier
                                                                                                                                                                                                          (added in 1.0.0)
                                                                                                                                                                                                          vlan yes
                                                                                                                                                                                                            Specifies the VLAN ID that is assocated with the Vxlan interface for managing the VLAN to VNI mapping. Valid values for the vlan parameter are in the range of 1 to 4094.
                                                                                                                                                                                                            (added in 1.0.0)
                                                                                                                                                                                                            vni no
                                                                                                                                                                                                              Specifies the VNI value to assoicate with the Vxlan interface for managing the VLAN to VNI mapping. This value is only necessary when configuring the mapping with a state of present (default). Valie values for the vni parameter are in the range of 1 to 16777215.
                                                                                                                                                                                                              (added in 1.0.0)

                                                                                                                                                                                                              Important

                                                                                                                                                                                                              Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                                                                                              Important

                                                                                                                                                                                                              Requires Python Client for eAPI 0.3.0 or later

                                                                                                                                                                                                              Examples

                                                                                                                                                                                                              - name: create a new vlan to vni mapping
                                                                                                                                                                                                                eos_vxlan_vlan: name=Vxlan1 state=present vlan=100 vni=1000
                                                                                                                                                                                                              
                                                                                                                                                                                                              - name: remove an existing mapping if present in the config
                                                                                                                                                                                                                eos_vxlan_vlan: name=Vxlan1 state=absent vlan=200
                                                                                                                                                                                                              

                                                                                                                                                                                                              Note

                                                                                                                                                                                                              All configuration is idempotent unless otherwise specified

                                                                                                                                                                                                              Note

                                                                                                                                                                                                              Supports eos metaparameters for using the eAPI transport

                                                                                                                                                                                                              Note

                                                                                                                                                                                                              Supports stateful resource configuration.

                                                                                                                                                                                                              eos_vxlan_vtep

                                                                                                                                                                                                              Synopsis

                                                                                                                                                                                                              Added in version 1.0.0

                                                                                                                                                                                                              The eos_vxlan_vtep module manages the Vxlan global VTEP flood list configure on Arista EOS nodes that are operating as VTEPs

                                                                                                                                                                                                              Options
                                                                                                                                                                                                              parameter required default choices comments
                                                                                                                                                                                                              name yes
                                                                                                                                                                                                                The unique interface identifier name. The interface name must use the full interface name (no abbreviated names). For example, interfaces should be specified as Ethernet1 not Et1
                                                                                                                                                                                                                Note: The name parameter only accepts Vxlan1 as the identifier
                                                                                                                                                                                                                (added in 1.0.0)
                                                                                                                                                                                                                vlan no
                                                                                                                                                                                                                  Specifies the VLAN ID to associate the VTEP with. If the VLAN argument is not used, the the VTEP is confgured on the global flood list.
                                                                                                                                                                                                                  (added in 1.0.1)
                                                                                                                                                                                                                  vtep yes
                                                                                                                                                                                                                    Specifes the remote endpoing IP address to add to the global VTEP flood list. Valid values for the vtep parameter are unicast IPv4 addresses
                                                                                                                                                                                                                    (added in 1.0.0)

                                                                                                                                                                                                                    Important

                                                                                                                                                                                                                    Requires Arista EOS 4.13.7M or later with command API enabled

                                                                                                                                                                                                                    Important

                                                                                                                                                                                                                    Requires Python Client for eAPI 0.3.0 or later

                                                                                                                                                                                                                    Examples

                                                                                                                                                                                                                    - name: Ensures that 1.1.1.1 is in the global flood list
                                                                                                                                                                                                                      eos_vxlan_vtep: name=Vxlan1 state=present vtep=1.1.1.1
                                                                                                                                                                                                                    
                                                                                                                                                                                                                    - name: Ensures that 2.2.2.2 is not in the global flood list
                                                                                                                                                                                                                      eos_vxlan_vtep: name=Vxlan1 state=absent vtep=2.2.2.2
                                                                                                                                                                                                                    

                                                                                                                                                                                                                    Note

                                                                                                                                                                                                                    All configuration is idempotent unless otherwise specified

                                                                                                                                                                                                                    Note

                                                                                                                                                                                                                    Supports eos metaparameters for using the eAPI transport

                                                                                                                                                                                                                    Note

                                                                                                                                                                                                                    Supports stateful resource configuration.

                                                                                                                                                                                                                    Juniper Modules

                                                                                                                                                                                                                    These docs were dynamically created from the modules that can be found here.

                                                                                                                                                                                                                    junos_commit

                                                                                                                                                                                                                    Synopsis

                                                                                                                                                                                                                    Added in version 1.2.0

                                                                                                                                                                                                                    Execute a Commit on a device running Junos independently of loading a configuration

                                                                                                                                                                                                                    Options
                                                                                                                                                                                                                    parameter required default choices comments
                                                                                                                                                                                                                    comment no None
                                                                                                                                                                                                                      Provide a comment to the commit of the configuration
                                                                                                                                                                                                                      confirm no None
                                                                                                                                                                                                                        Provide a confirm in minutes to the commit of the configuration
                                                                                                                                                                                                                        host yes
                                                                                                                                                                                                                          Set to {{ inventory_hostname }}
                                                                                                                                                                                                                          logfile no None
                                                                                                                                                                                                                            Path on the local server where the progress status is logged for debugging purposes
                                                                                                                                                                                                                            passwd no assumes ssh-key active
                                                                                                                                                                                                                              Login password
                                                                                                                                                                                                                              port no 830
                                                                                                                                                                                                                                TCP port number to use when connecting to the device
                                                                                                                                                                                                                                timeout no 0
                                                                                                                                                                                                                                  Extend the NETCONF RPC timeout beyond the default value of 30 seconds. Set this value to accommodate commits that might take longer than the default timeout interval.
                                                                                                                                                                                                                                  user no $USER
                                                                                                                                                                                                                                    Login username

                                                                                                                                                                                                                                    Important

                                                                                                                                                                                                                                    Requires junos-eznc >= 1.2.2

                                                                                                                                                                                                                                    Examples

                                                                                                                                                                                                                                    - junos_commit:
                                                                                                                                                                                                                                       host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                       logfile=changes.log
                                                                                                                                                                                                                                       comment="Non load commit"
                                                                                                                                                                                                                                    

                                                                                                                                                                                                                                    junos_get_config

                                                                                                                                                                                                                                    Synopsis

                                                                                                                                                                                                                                    Added in version 1.2.0

                                                                                                                                                                                                                                    Retrieve the configuration of a device running Junos and save it to a file. Note unicode chars will be converted to ‘??’ as also done in PyEZ

                                                                                                                                                                                                                                    Options
                                                                                                                                                                                                                                    parameter required default choices comments
                                                                                                                                                                                                                                    dest yes None
                                                                                                                                                                                                                                      Path to the local server directory where configuration will be saved.
                                                                                                                                                                                                                                      filter no None
                                                                                                                                                                                                                                        Defines heircachy of configuration to retrieve. If omitted entire configuration is retrieved. Format is slash notation ex groups/routeinst/routing-instances/ISP-1
                                                                                                                                                                                                                                        format no text
                                                                                                                                                                                                                                        • text
                                                                                                                                                                                                                                        • xml
                                                                                                                                                                                                                                        text - configuration saved as text (curly-brace) format
                                                                                                                                                                                                                                        xml - configuration saved as XML
                                                                                                                                                                                                                                        host yes
                                                                                                                                                                                                                                          Set to {{ inventory_hostname }}
                                                                                                                                                                                                                                          logfile no None
                                                                                                                                                                                                                                            Path on the local server where the progress status is logged for debugging purposes
                                                                                                                                                                                                                                            options no None
                                                                                                                                                                                                                                              Additional options to pass to get_config. Refer to jnpr.junos.rpcmeta.get_config for details.
                                                                                                                                                                                                                                              passwd no assumes ssh-key active
                                                                                                                                                                                                                                                Login password
                                                                                                                                                                                                                                                port no 830
                                                                                                                                                                                                                                                  TCP port number to use when connecting to the device
                                                                                                                                                                                                                                                  user no $USER
                                                                                                                                                                                                                                                    Login username

                                                                                                                                                                                                                                                    Important

                                                                                                                                                                                                                                                    Requires junos-eznc >= 1.2.2

                                                                                                                                                                                                                                                    Examples

                                                                                                                                                                                                                                                    - junos_get_config:
                                                                                                                                                                                                                                                       host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                       logfile: get_config.log
                                                                                                                                                                                                                                                       dest: "{{ inventory_hostname }}.xml"
                                                                                                                                                                                                                                                       format: xml
                                                                                                                                                                                                                                                       filter: "interfaces"
                                                                                                                                                                                                                                                       options: {inherit: inherit, groups: groups}
                                                                                                                                                                                                                                                    

                                                                                                                                                                                                                                                    junos_get_facts

                                                                                                                                                                                                                                                    Synopsis

                                                                                                                                                                                                                                                    Added in version 1.0.0

                                                                                                                                                                                                                                                    Retrieve facts for a device running Junos OS, which includes information such as the serial number, product model, and Junos OS version. The module supports using both NETCONF and CONSOLE-based retrieval and returns the information as a JSON dictionary. The information is similar to facts gathered by other IT frameworks.

                                                                                                                                                                                                                                                    Options
                                                                                                                                                                                                                                                    parameter required default choices comments
                                                                                                                                                                                                                                                    console no None
                                                                                                                                                                                                                                                      CONSOLE port, per the netconify utility
                                                                                                                                                                                                                                                      host yes
                                                                                                                                                                                                                                                        Set to {{ inventory_hostname }}
                                                                                                                                                                                                                                                        logfile no None
                                                                                                                                                                                                                                                          Path on the local server where the progress status is logged for debugging purposes. This option is used only with the console option.
                                                                                                                                                                                                                                                          passwd no assumes ssh-key active
                                                                                                                                                                                                                                                            Login password
                                                                                                                                                                                                                                                            port no 830
                                                                                                                                                                                                                                                              TCP port number to use when connecting to the device
                                                                                                                                                                                                                                                              savedir no $CWD
                                                                                                                                                                                                                                                                Path to the local server directory where device fact files will be stored. Resulting file will be savedir/hostname-facts.json
                                                                                                                                                                                                                                                                user no $USER
                                                                                                                                                                                                                                                                  Login username

                                                                                                                                                                                                                                                                  Important

                                                                                                                                                                                                                                                                  Requires junos-eznc >= 1.2.2

                                                                                                                                                                                                                                                                  Important

                                                                                                                                                                                                                                                                  Requires junos-netconify >= 1.0.1, when using the console option

                                                                                                                                                                                                                                                                  Examples

                                                                                                                                                                                                                                                                  # retrieve facts using NETCONF, assumes ssh-keys
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                  - junos_get_facts: host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                    register: junos
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                  # retrieve facts using CONSOLE, assumes Amnesiac system
                                                                                                                                                                                                                                                                  # root login, no password
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                  - junos_get_facts:
                                                                                                                                                                                                                                                                      host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                      user=root
                                                                                                                                                                                                                                                                      console="--telnet={{TERMSERV}},{{TERMSERVPORT}}"
                                                                                                                                                                                                                                                                      savedir=/usr/local/junos/inventory
                                                                                                                                                                                                                                                                    register: junos
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                  # access the facts
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                  - name: version
                                                                                                                                                                                                                                                                    debug: msg="{{ junos.facts.version }}"
                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                  junos_install_config

                                                                                                                                                                                                                                                                  Synopsis

                                                                                                                                                                                                                                                                  Added in version 1.0.0

                                                                                                                                                                                                                                                                  Load a complete Junos OS configuration (overwrite) or merge a configuration snippet onto a device running Junos OS and commit it. The default behavior is to perform a load merge operation (overwrite=’no’). This module performs an atomic lock/edit/unlock. If the process fails at any step, then all configuration changes are discarded. You can load the configuration using either NETCONF or the CONSOLE port. Specify the console option to use the CONSOLE port. You provide the configuration data in a file. Supported formats when using NETCONF include ASCII text, Junos XML elements, and Junos OS set commands. Configurations performed through the console must only use ASCII text formatting.

                                                                                                                                                                                                                                                                  Options
                                                                                                                                                                                                                                                                  parameter required default choices comments
                                                                                                                                                                                                                                                                  comment no None
                                                                                                                                                                                                                                                                    Provide a comment to the commit of the configuration
                                                                                                                                                                                                                                                                    confirm no None
                                                                                                                                                                                                                                                                      Provide a confirm in minutes to the commit of the configuration
                                                                                                                                                                                                                                                                      console no None
                                                                                                                                                                                                                                                                        Port configuration, per the netconify utility
                                                                                                                                                                                                                                                                        diffs_file no None
                                                                                                                                                                                                                                                                          Path to the file where any diffs will be written
                                                                                                                                                                                                                                                                          file yes
                                                                                                                                                                                                                                                                            Path to the file containing the Junos OS configuration data. If the file has a *.conf extension, the content is treated as text format. If the file has a *.xml extension, the content is treated as XML format. If the file has a *.set extension, the content is treated as Junos OS set commands.
                                                                                                                                                                                                                                                                            host yes
                                                                                                                                                                                                                                                                              Set to {{ inventory_hostname }}
                                                                                                                                                                                                                                                                              logfile no None
                                                                                                                                                                                                                                                                                Path on the local server where the progress status is logged for debugging purposes
                                                                                                                                                                                                                                                                                overwrite no
                                                                                                                                                                                                                                                                                • true
                                                                                                                                                                                                                                                                                • false
                                                                                                                                                                                                                                                                                • yes
                                                                                                                                                                                                                                                                                • no
                                                                                                                                                                                                                                                                                Specify whether the configuration file completely replaces the existing configuration.
                                                                                                                                                                                                                                                                                passwd no assumes ssh-key active
                                                                                                                                                                                                                                                                                  Login password
                                                                                                                                                                                                                                                                                  port no 830
                                                                                                                                                                                                                                                                                    TCP port number to use when connecting to the device
                                                                                                                                                                                                                                                                                    replace no
                                                                                                                                                                                                                                                                                    • true
                                                                                                                                                                                                                                                                                    • false
                                                                                                                                                                                                                                                                                    • yes
                                                                                                                                                                                                                                                                                    • no
                                                                                                                                                                                                                                                                                    Specify whether the configuration file uses "replace:" statements. (NETCONF only) NOT compatible with set format
                                                                                                                                                                                                                                                                                    savedir no None
                                                                                                                                                                                                                                                                                      Path to the local server directory where device facts and inventory files will be stored. This option is used only with the console option. Refer to the netconify utility for details.
                                                                                                                                                                                                                                                                                      timeout no 0
                                                                                                                                                                                                                                                                                        Extend the NETCONF RPC timeout beyond the default value of 30 seconds. Set this value to accommodate configuration changes (commits) that might take longer than the default timeout interval.
                                                                                                                                                                                                                                                                                        user no $USER
                                                                                                                                                                                                                                                                                          Login username

                                                                                                                                                                                                                                                                                          Important

                                                                                                                                                                                                                                                                                          Requires junos-eznc >= 1.2.2

                                                                                                                                                                                                                                                                                          Important

                                                                                                                                                                                                                                                                                          Requires junos-netconify >= 1.0.1, when using the console option

                                                                                                                                                                                                                                                                                          Examples

                                                                                                                                                                                                                                                                                          # load merge a change to the Junos OS configuration using NETCONF
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          - junos_install_config:
                                                                                                                                                                                                                                                                                              host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                              file=banner.conf
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          # load overwrite a new Junos OS configuration using the CONSOLE port
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          - junos_install_config:
                                                                                                                                                                                                                                                                                              host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                              console="--telnet={{TERMSERV}},{{TERMSERV_PORT}}"
                                                                                                                                                                                                                                                                                              file=default_new_switch.conf
                                                                                                                                                                                                                                                                                              overwrite=yes
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          # load merge a change to the Junos OS configuration using NETCONF and supplying a commit log message
                                                                                                                                                                                                                                                                                          - junos_install_config:
                                                                                                                                                                                                                                                                                              host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                              file=banner.conf
                                                                                                                                                                                                                                                                                              comment="configured by ansible"
                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                          # load replace a change to the Junos OS configuration using NETCONF
                                                                                                                                                                                                                                                                                          - junos_install_config:
                                                                                                                                                                                                                                                                                              host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                              file=snmp.conf
                                                                                                                                                                                                                                                                                              replace=yes
                                                                                                                                                                                                                                                                                          

                                                                                                                                                                                                                                                                                          junos_install_os

                                                                                                                                                                                                                                                                                          Synopsis

                                                                                                                                                                                                                                                                                          Added in version 1.0.0

                                                                                                                                                                                                                                                                                          Install a Junos OS image on one or more Routing Engines. This module supports installations on single Routing Engine devices, MX Series routers with dual Routing Engines, and EX Series switches in a non-mixed Virtual Chassis. This action is equivalent to performing the Junos OS request system software add operational command. If the existing Junos OS version matches the desired version, no action is performed, and the “changed” attribute reports False. If the existing version does not match, then the module performs the following actions (1) Computes the MD5 checksum of the package located on the server. (2) Copies the Junos OS software package to the device running Junos OS. (3) Computes the MD5 checksum on the device running Junos OS and compares the two. (4) Installs the Junos OS software package. (5) Reboots the device (default). Running the module in check mode reports whether the current Junos OS version matches the desired version.

                                                                                                                                                                                                                                                                                          Options
                                                                                                                                                                                                                                                                                          parameter required default choices comments
                                                                                                                                                                                                                                                                                          host yes
                                                                                                                                                                                                                                                                                            Set to {{ inventory_hostname }}
                                                                                                                                                                                                                                                                                            logfile no None
                                                                                                                                                                                                                                                                                              Path on the local server where the progress status is logged for debugging purposes
                                                                                                                                                                                                                                                                                              no_copy no
                                                                                                                                                                                                                                                                                              • true
                                                                                                                                                                                                                                                                                              • false
                                                                                                                                                                                                                                                                                              Installer need to be copied or not on the device.
                                                                                                                                                                                                                                                                                              package yes
                                                                                                                                                                                                                                                                                                Absolute path on the local server to the Junos OS software package
                                                                                                                                                                                                                                                                                                passwd no assumes ssh-key active
                                                                                                                                                                                                                                                                                                  Login password
                                                                                                                                                                                                                                                                                                  port no 830
                                                                                                                                                                                                                                                                                                    TCP port number to use when connecting to the device
                                                                                                                                                                                                                                                                                                    reboot no True
                                                                                                                                                                                                                                                                                                    • yes
                                                                                                                                                                                                                                                                                                    • no
                                                                                                                                                                                                                                                                                                    If set to yes, the device reboots after the installation completes.
                                                                                                                                                                                                                                                                                                    reboot_pause no 10
                                                                                                                                                                                                                                                                                                      Amount of time in seconds to wait after the reboot is issued
                                                                                                                                                                                                                                                                                                      user no $USER
                                                                                                                                                                                                                                                                                                        Login username
                                                                                                                                                                                                                                                                                                        version yes
                                                                                                                                                                                                                                                                                                          Junos OS version string as it would be reported by the show version command

                                                                                                                                                                                                                                                                                                          Important

                                                                                                                                                                                                                                                                                                          Requires py-junos-eznc >= 1.2.2

                                                                                                                                                                                                                                                                                                          Examples

                                                                                                                                                                                                                                                                                                          - junos_install_os:
                                                                                                                                                                                                                                                                                                              host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                              version=12.1X46-D10.2
                                                                                                                                                                                                                                                                                                              package=/usr/local/junos/images/junos-vsrx-12.1X46-D10.2-domestic.tgz
                                                                                                                                                                                                                                                                                                              logfile=/usr/local/junos/log/software.log
                                                                                                                                                                                                                                                                                                          

                                                                                                                                                                                                                                                                                                          junos_rollback

                                                                                                                                                                                                                                                                                                          Synopsis

                                                                                                                                                                                                                                                                                                          Added in version 1.2.0

                                                                                                                                                                                                                                                                                                          Rollback the configuration of a device running Junos

                                                                                                                                                                                                                                                                                                          Options
                                                                                                                                                                                                                                                                                                          parameter required default choices comments
                                                                                                                                                                                                                                                                                                          comment no None
                                                                                                                                                                                                                                                                                                            Provide a comment to the commit of the configuration
                                                                                                                                                                                                                                                                                                            confirm no None
                                                                                                                                                                                                                                                                                                              Provide a confirm in minutes to the commit of the configuration
                                                                                                                                                                                                                                                                                                              diffs_file no None
                                                                                                                                                                                                                                                                                                                Path to the file where any diffs will be written
                                                                                                                                                                                                                                                                                                                host yes
                                                                                                                                                                                                                                                                                                                  Set to {{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                  logfile no None
                                                                                                                                                                                                                                                                                                                    Path on the local server where the progress status is logged for debugging purposes
                                                                                                                                                                                                                                                                                                                    passwd no assumes ssh-key active
                                                                                                                                                                                                                                                                                                                      Login password
                                                                                                                                                                                                                                                                                                                      port no 830
                                                                                                                                                                                                                                                                                                                        TCP port number to use when connecting to the device
                                                                                                                                                                                                                                                                                                                        rollback yes None
                                                                                                                                                                                                                                                                                                                          The rollback id value [0-49]
                                                                                                                                                                                                                                                                                                                          user no $USER
                                                                                                                                                                                                                                                                                                                            Login username

                                                                                                                                                                                                                                                                                                                            Important

                                                                                                                                                                                                                                                                                                                            Requires junos-eznc >= 1.2.2

                                                                                                                                                                                                                                                                                                                            Examples

                                                                                                                                                                                                                                                                                                                            - junos_rollback:
                                                                                                                                                                                                                                                                                                                               host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                               logfile=rollback.log
                                                                                                                                                                                                                                                                                                                               diffs_file=rollback.diff
                                                                                                                                                                                                                                                                                                                               rollback=1
                                                                                                                                                                                                                                                                                                                               comment="Rolled back by Ansible"
                                                                                                                                                                                                                                                                                                                               confirm=5
                                                                                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                                                                                            junos_shutdown

                                                                                                                                                                                                                                                                                                                            Synopsis

                                                                                                                                                                                                                                                                                                                            Added in version 1.0.0

                                                                                                                                                                                                                                                                                                                            Shut down (power off) or reboot a device running Junos OS. This includes all Routing Engines in a Virtual Chassis or a dual Routing Engine system. This is equivalent to executing either the Junos OS request system power-off or request system reboot operational command.

                                                                                                                                                                                                                                                                                                                            Options
                                                                                                                                                                                                                                                                                                                            parameter required default choices comments
                                                                                                                                                                                                                                                                                                                            host yes
                                                                                                                                                                                                                                                                                                                              Set to {{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                              passwd no assumes ssh-key active
                                                                                                                                                                                                                                                                                                                                Login password
                                                                                                                                                                                                                                                                                                                                port no 830
                                                                                                                                                                                                                                                                                                                                  TCP port number to use when connecting to the device
                                                                                                                                                                                                                                                                                                                                  reboot no
                                                                                                                                                                                                                                                                                                                                  • yes
                                                                                                                                                                                                                                                                                                                                  • no
                                                                                                                                                                                                                                                                                                                                  If set to yes, then the device is rebooted rather than powered off.
                                                                                                                                                                                                                                                                                                                                  shutdown yes None
                                                                                                                                                                                                                                                                                                                                    Safety mechanism. You MUST set this to 'shutdown'.
                                                                                                                                                                                                                                                                                                                                    user no $USER
                                                                                                                                                                                                                                                                                                                                      Login username

                                                                                                                                                                                                                                                                                                                                      Important

                                                                                                                                                                                                                                                                                                                                      Requires junos-eznc >= 1.2.2

                                                                                                                                                                                                                                                                                                                                      Examples

                                                                                                                                                                                                                                                                                                                                      - junos_shutdown:
                                                                                                                                                                                                                                                                                                                                          host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                          shutdown="shutdown"
                                                                                                                                                                                                                                                                                                                                          reboot=yes
                                                                                                                                                                                                                                                                                                                                      

                                                                                                                                                                                                                                                                                                                                      junos_srx_cluster

                                                                                                                                                                                                                                                                                                                                      Synopsis

                                                                                                                                                                                                                                                                                                                                      Added in version 1.2.0

                                                                                                                                                                                                                                                                                                                                      Create an srx chassis cluster and reboot the device. The device must be capable of forming an srx cluster and have the correct cables installed.

                                                                                                                                                                                                                                                                                                                                      Options
                                                                                                                                                                                                                                                                                                                                      parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                      cluster_enable yes
                                                                                                                                                                                                                                                                                                                                      • true
                                                                                                                                                                                                                                                                                                                                      • false
                                                                                                                                                                                                                                                                                                                                      • yes
                                                                                                                                                                                                                                                                                                                                      • no
                                                                                                                                                                                                                                                                                                                                      yes/true - set device to cluster mode (specify cluster_id and node)
                                                                                                                                                                                                                                                                                                                                      no/false - set device to stand alone mode (disable cluster mode)
                                                                                                                                                                                                                                                                                                                                      cluster_id no None
                                                                                                                                                                                                                                                                                                                                        set to the cluster id , required for cluster_enable=YES
                                                                                                                                                                                                                                                                                                                                        console no None
                                                                                                                                                                                                                                                                                                                                          SERIAL or TERMINAL-SERVER port setting, per use with the netconify utility
                                                                                                                                                                                                                                                                                                                                          host yes
                                                                                                                                                                                                                                                                                                                                            Set to {{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                            logfile no None
                                                                                                                                                                                                                                                                                                                                              Path on the local server where the progress status is logged for debugging purposes
                                                                                                                                                                                                                                                                                                                                              node no None
                                                                                                                                                                                                                                                                                                                                                set to the node required (0 or 1)
                                                                                                                                                                                                                                                                                                                                                passwd no assumes ssh-key active
                                                                                                                                                                                                                                                                                                                                                  Login password
                                                                                                                                                                                                                                                                                                                                                  port no 830
                                                                                                                                                                                                                                                                                                                                                    TCP port number to use when connecting to the device
                                                                                                                                                                                                                                                                                                                                                    user no $USER
                                                                                                                                                                                                                                                                                                                                                      Login username

                                                                                                                                                                                                                                                                                                                                                      Important

                                                                                                                                                                                                                                                                                                                                                      Requires junos-eznc >= 1.2.2

                                                                                                                                                                                                                                                                                                                                                      Examples

                                                                                                                                                                                                                                                                                                                                                      -junos_srx_cluster:
                                                                                                                                                                                                                                                                                                                                                        host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                                        console="--port={{ serial }}"
                                                                                                                                                                                                                                                                                                                                                        user=rick
                                                                                                                                                                                                                                                                                                                                                        passwd=password123
                                                                                                                                                                                                                                                                                                                                                        cluster_enable=true
                                                                                                                                                                                                                                                                                                                                                        logfile=cluster.log
                                                                                                                                                                                                                                                                                                                                                        cluster_id={{ cluster_id }}
                                                                                                                                                                                                                                                                                                                                                        node={{ node_id }}
                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                      -junos_srx_cluster:
                                                                                                                                                                                                                                                                                                                                                        host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                                        user=rick
                                                                                                                                                                                                                                                                                                                                                        passwd=password123
                                                                                                                                                                                                                                                                                                                                                        cluster_enable=false
                                                                                                                                                                                                                                                                                                                                                        logfile=cluster.log
                                                                                                                                                                                                                                                                                                                                                      

                                                                                                                                                                                                                                                                                                                                                      junos_zeroize

                                                                                                                                                                                                                                                                                                                                                      Synopsis

                                                                                                                                                                                                                                                                                                                                                      Added in version 1.0.0

                                                                                                                                                                                                                                                                                                                                                      Execute the Junos OS request system zeroize command to remove all configuration information on the Routing Engines and reset all key values on a device running Junos OS. The command removes all data files, including customized configuration and log files, by unlinking the files from their directories. The command also removes all user-created files from the system including all plain-text passwords, secrets, and private keys for SSH, local encryption, local authentication, IPsec, RADIUS, TACACS+, and SNMP. This command reboots the device and sets it to the factory default configuration. After the reboot, you must log in through the console as root in order to access the device.

                                                                                                                                                                                                                                                                                                                                                      Options
                                                                                                                                                                                                                                                                                                                                                      parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                      console no None
                                                                                                                                                                                                                                                                                                                                                        SERIAL or TERMINAL-SERVER port setting, per use with the netconify utility
                                                                                                                                                                                                                                                                                                                                                        host no
                                                                                                                                                                                                                                                                                                                                                          Set to {{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                                          logfile no None
                                                                                                                                                                                                                                                                                                                                                            Path on the local server where the progress status is logged for debugging purposes
                                                                                                                                                                                                                                                                                                                                                            passwd no assumes ssh-key active
                                                                                                                                                                                                                                                                                                                                                              Login password
                                                                                                                                                                                                                                                                                                                                                              port no 830
                                                                                                                                                                                                                                                                                                                                                                TCP port number to use when connecting to the device
                                                                                                                                                                                                                                                                                                                                                                user no $USER
                                                                                                                                                                                                                                                                                                                                                                  Login username
                                                                                                                                                                                                                                                                                                                                                                  zeroize yes None
                                                                                                                                                                                                                                                                                                                                                                    Safety mechanism. You MUST set this to 'zeroize'.

                                                                                                                                                                                                                                                                                                                                                                    Important

                                                                                                                                                                                                                                                                                                                                                                    Requires junos-eznc >= 1.2.2

                                                                                                                                                                                                                                                                                                                                                                    Important

                                                                                                                                                                                                                                                                                                                                                                    Requires junos-netconify >= 1.0.1, when using the console option

                                                                                                                                                                                                                                                                                                                                                                    Examples

                                                                                                                                                                                                                                                                                                                                                                    - junos_zeroize:
                                                                                                                                                                                                                                                                                                                                                                        host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                                                        zeroize="zeroize"
                                                                                                                                                                                                                                                                                                                                                                    

                                                                                                                                                                                                                                                                                                                                                                    Note

                                                                                                                                                                                                                                                                                                                                                                    You MUST either use the host option or the console option to designate how the device is accessed.

                                                                                                                                                                                                                                                                                                                                                                    ntc-ansible Modules (multi-vendor)

                                                                                                                                                                                                                                                                                                                                                                    These docs were dynamically created from the modules that can be found here.

                                                                                                                                                                                                                                                                                                                                                                    compare_dict

                                                                                                                                                                                                                                                                                                                                                                    Synopsis

                                                                                                                                                                                                                                                                                                                                                                    This module verifies that the result received from TextFSM for a particular template matches the expected output from a test scenario. It does so by comparing two lists of dictionaries going through elements of one and checking if the element ‘is in’ the second list.

                                                                                                                                                                                                                                                                                                                                                                    Options
                                                                                                                                                                                                                                                                                                                                                                    parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                    result yes
                                                                                                                                                                                                                                                                                                                                                                      a list of dictionaries received from ntc_show_command module
                                                                                                                                                                                                                                                                                                                                                                      sample yes
                                                                                                                                                                                                                                                                                                                                                                        a parsed sample from a test scenario

                                                                                                                                                                                                                                                                                                                                                                        Important

                                                                                                                                                                                                                                                                                                                                                                        Requires none

                                                                                                                                                                                                                                                                                                                                                                        Examples

                                                                                                                                                                                                                                                                                                                                                                        # verify that parsed result is the same as expected
                                                                                                                                                                                                                                                                                                                                                                        - compare_dict:
                                                                                                                                                                                                                                                                                                                                                                            result: "{{ item.item.response }}"
                                                                                                                                                                                                                                                                                                                                                                            sample: "{{ item.ansible_facts.parsed_sample }}"
                                                                                                                                                                                                                                                                                                                                                                        

                                                                                                                                                                                                                                                                                                                                                                        get_test_info

                                                                                                                                                                                                                                                                                                                                                                        Synopsis

                                                                                                                                                                                                                                                                                                                                                                        Offers ability to dynamically create a list of dictionaries with info required to test all templates. This will loop through the tests dir and build each dictionary to have command, platform, rawfile, parsedfile, and path for each.

                                                                                                                                                                                                                                                                                                                                                                        Options
                                                                                                                                                                                                                                                                                                                                                                        parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                        path yes
                                                                                                                                                                                                                                                                                                                                                                          location where tests are located

                                                                                                                                                                                                                                                                                                                                                                          Examples

                                                                                                                                                                                                                                                                                                                                                                          - get_test_info:
                                                                                                                                                                                                                                                                                                                                                                          

                                                                                                                                                                                                                                                                                                                                                                          ntc_config_command

                                                                                                                                                                                                                                                                                                                                                                          Synopsis

                                                                                                                                                                                                                                                                                                                                                                          This module write config data to devices that don’t have an API. The use case would be writing configuration based on output gleaned from ntc_show_command output.

                                                                                                                                                                                                                                                                                                                                                                          Options
                                                                                                                                                                                                                                                                                                                                                                          parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                          commands no
                                                                                                                                                                                                                                                                                                                                                                            Command to execute on target device
                                                                                                                                                                                                                                                                                                                                                                            commands_file yes
                                                                                                                                                                                                                                                                                                                                                                              Command to execute on target device
                                                                                                                                                                                                                                                                                                                                                                              connection no ssh
                                                                                                                                                                                                                                                                                                                                                                              • ssh
                                                                                                                                                                                                                                                                                                                                                                              connect to device using netmiko or read from offline file for testing
                                                                                                                                                                                                                                                                                                                                                                              host no
                                                                                                                                                                                                                                                                                                                                                                                IP Address or hostname (resolvable by Ansible control host)
                                                                                                                                                                                                                                                                                                                                                                                password no
                                                                                                                                                                                                                                                                                                                                                                                  Password used to login to the target device
                                                                                                                                                                                                                                                                                                                                                                                  platform yes ssh
                                                                                                                                                                                                                                                                                                                                                                                    Platform FROM the index file
                                                                                                                                                                                                                                                                                                                                                                                    port no 22
                                                                                                                                                                                                                                                                                                                                                                                      SSH port to use to connect to the target device
                                                                                                                                                                                                                                                                                                                                                                                      secret no
                                                                                                                                                                                                                                                                                                                                                                                        Password used to enter a privileged mode on the target device
                                                                                                                                                                                                                                                                                                                                                                                        username no
                                                                                                                                                                                                                                                                                                                                                                                          Username used to login to the target device

                                                                                                                                                                                                                                                                                                                                                                                          Important

                                                                                                                                                                                                                                                                                                                                                                                          Requires netmiko

                                                                                                                                                                                                                                                                                                                                                                                          Examples

                                                                                                                                                                                                                                                                                                                                                                                          # write vlan data
                                                                                                                                                                                                                                                                                                                                                                                          - ntc_config_command:
                                                                                                                                                                                                                                                                                                                                                                                              connection: ssh
                                                                                                                                                                                                                                                                                                                                                                                              platform: cisco_nxos
                                                                                                                                                                                                                                                                                                                                                                                              commands:
                                                                                                                                                                                                                                                                                                                                                                                                - vlan 10
                                                                                                                                                                                                                                                                                                                                                                                                - name vlan_10
                                                                                                                                                                                                                                                                                                                                                                                                - end
                                                                                                                                                                                                                                                                                                                                                                                              host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                              username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                              password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                              secret: "{{ secret }}"
                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                          # write config from file
                                                                                                                                                                                                                                                                                                                                                                                          - ntc_config_command:
                                                                                                                                                                                                                                                                                                                                                                                              connection: ssh
                                                                                                                                                                                                                                                                                                                                                                                              platform: cisco_nxos
                                                                                                                                                                                                                                                                                                                                                                                              commands_file: "dynamically_created_config.txt"
                                                                                                                                                                                                                                                                                                                                                                                              host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                              username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                              password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                              secret: "{{ secret }}"
                                                                                                                                                                                                                                                                                                                                                                                          

                                                                                                                                                                                                                                                                                                                                                                                          ntc_file_copy

                                                                                                                                                                                                                                                                                                                                                                                          Synopsis

                                                                                                                                                                                                                                                                                                                                                                                          Added in version 1.9.2

                                                                                                                                                                                                                                                                                                                                                                                          Copy a file to the flash (or bootflash) remote network device on supported platforms over SCP. Supported platforms include Cisco Nexus switches with NX-API, Cisco IOS switches or routers, Arista switches with eAPI.

                                                                                                                                                                                                                                                                                                                                                                                          Options
                                                                                                                                                                                                                                                                                                                                                                                          parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                                          host yes
                                                                                                                                                                                                                                                                                                                                                                                            Hostame or IP address of switch.
                                                                                                                                                                                                                                                                                                                                                                                            local_file yes
                                                                                                                                                                                                                                                                                                                                                                                              Path to local file. Local directory must exist.
                                                                                                                                                                                                                                                                                                                                                                                              ntc_conf_file no
                                                                                                                                                                                                                                                                                                                                                                                                The path to a local NTC configuration file. If omitted, and ntc_host is specified, the system will look for a file given by the path in the environment variable PYNTC_CONF, and then in the users home directory for a file called .ntc.conf.
                                                                                                                                                                                                                                                                                                                                                                                                ntc_host no
                                                                                                                                                                                                                                                                                                                                                                                                  The name of a host as specified in an NTC configuration file.
                                                                                                                                                                                                                                                                                                                                                                                                  password yes
                                                                                                                                                                                                                                                                                                                                                                                                    Password used to login to the target device
                                                                                                                                                                                                                                                                                                                                                                                                    platform yes
                                                                                                                                                                                                                                                                                                                                                                                                    • cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                    • arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                    • cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                    Switch platform
                                                                                                                                                                                                                                                                                                                                                                                                    port no
                                                                                                                                                                                                                                                                                                                                                                                                      TCP/UDP port to connect to target device. If omitted standard port numbers will be used. 80 for HTTP; 443 for HTTPS; 22 for SSH.
                                                                                                                                                                                                                                                                                                                                                                                                      remote_file no
                                                                                                                                                                                                                                                                                                                                                                                                        Remote file path to be copied to flash. Remote directories must exist. If omitted, the name of the local file will be used.
                                                                                                                                                                                                                                                                                                                                                                                                        secret no
                                                                                                                                                                                                                                                                                                                                                                                                          Enable secret for devices connecting over SSH.
                                                                                                                                                                                                                                                                                                                                                                                                          transport no
                                                                                                                                                                                                                                                                                                                                                                                                          • http
                                                                                                                                                                                                                                                                                                                                                                                                          • https
                                                                                                                                                                                                                                                                                                                                                                                                          Transport protocol for API-based devices. Not used for actual file transfer.
                                                                                                                                                                                                                                                                                                                                                                                                          username yes
                                                                                                                                                                                                                                                                                                                                                                                                            Username used to login to the target device

                                                                                                                                                                                                                                                                                                                                                                                                            Important

                                                                                                                                                                                                                                                                                                                                                                                                            Requires pyntc

                                                                                                                                                                                                                                                                                                                                                                                                            Examples

                                                                                                                                                                                                                                                                                                                                                                                                            - ntc_file_copy:
                                                                                                                                                                                                                                                                                                                                                                                                                platform: cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                                local_file: /path/to/file
                                                                                                                                                                                                                                                                                                                                                                                                                host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                transport: http
                                                                                                                                                                                                                                                                                                                                                                                                            - ntc_file_copy:
                                                                                                                                                                                                                                                                                                                                                                                                                ntc_host: n9k1
                                                                                                                                                                                                                                                                                                                                                                                                                ntc_conf_file: .ntc.conf
                                                                                                                                                                                                                                                                                                                                                                                                                local_file: /path/to/file
                                                                                                                                                                                                                                                                                                                                                                                                            - ntc_file_copy:
                                                                                                                                                                                                                                                                                                                                                                                                                ntc_host: eos_leaf
                                                                                                                                                                                                                                                                                                                                                                                                                local_file: /path/to/file
                                                                                                                                                                                                                                                                                                                                                                                                            - ntc_file_copy:
                                                                                                                                                                                                                                                                                                                                                                                                                platform: arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                                local_file: /path/to/file
                                                                                                                                                                                                                                                                                                                                                                                                                remote_file: /path/to/remote_file
                                                                                                                                                                                                                                                                                                                                                                                                                host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                            - ntc_file_copy:
                                                                                                                                                                                                                                                                                                                                                                                                                platform: cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                                local_file: "{{ local_file_1 }}"
                                                                                                                                                                                                                                                                                                                                                                                                                host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                secret: "{{ secret }}"
                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                            Return Values

                                                                                                                                                                                                                                                                                                                                                                                                            Common return values are documented here common_return_values, the following are the fields unique to this module:

                                                                                                                                                                                                                                                                                                                                                                                                            name despcription returned type sample
                                                                                                                                                                                                                                                                                                                                                                                                            local_file The path of the local file. success string /path/to/local/file
                                                                                                                                                                                                                                                                                                                                                                                                            remote_file The path of the remote file. success string /path/to/remote/file
                                                                                                                                                                                                                                                                                                                                                                                                            transfer_status Whether a file was transfered. "No Transfer" or "Sent". success string Sent


                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                            On NXOS, the feature must be enabled with feature scp-server.

                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                            On IOS and Arista EOS, the user must be at privelege 15.

                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                            If the file is already present (md5 sums match), no transfer will take place.

                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                            Check mode will tell you if the file would be copied.

                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                            The same user credentials are used on the API/SSH channel and the SCP file transfer channel.

                                                                                                                                                                                                                                                                                                                                                                                                            ntc_get_facts

                                                                                                                                                                                                                                                                                                                                                                                                            Synopsis

                                                                                                                                                                                                                                                                                                                                                                                                            Added in version 1.9.2

                                                                                                                                                                                                                                                                                                                                                                                                            Reboot a network device, optionally on a timer. Supported platforms include Cisco Nexus switches with NX-API, Cisco IOS switches or routers, Arista switches with eAPI.

                                                                                                                                                                                                                                                                                                                                                                                                            Options
                                                                                                                                                                                                                                                                                                                                                                                                            parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                                                            host no
                                                                                                                                                                                                                                                                                                                                                                                                              Hostame or IP address of switch.
                                                                                                                                                                                                                                                                                                                                                                                                              ntc_conf_file no
                                                                                                                                                                                                                                                                                                                                                                                                                The path to a local NTC configuration file. If omitted, and ntc_host is specified, the system will look for a file given by the path in the environment variable PYNTC_CONF, and then in the users home directory for a file called .ntc.conf.
                                                                                                                                                                                                                                                                                                                                                                                                                ntc_host no
                                                                                                                                                                                                                                                                                                                                                                                                                  The name of a host as specified in an NTC configuration file.
                                                                                                                                                                                                                                                                                                                                                                                                                  password no
                                                                                                                                                                                                                                                                                                                                                                                                                    Password used to login to the target device
                                                                                                                                                                                                                                                                                                                                                                                                                    platform no
                                                                                                                                                                                                                                                                                                                                                                                                                    • cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                                    • arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                                    • cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                                    Switch platform
                                                                                                                                                                                                                                                                                                                                                                                                                    port no
                                                                                                                                                                                                                                                                                                                                                                                                                      TCP/UDP port to connect to target device. If omitted standard port numbers will be used. 80 for HTTP; 443 for HTTPS; 22 for SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                      secret no
                                                                                                                                                                                                                                                                                                                                                                                                                        Enable secret for devices connecting over SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                        transport no
                                                                                                                                                                                                                                                                                                                                                                                                                        • http
                                                                                                                                                                                                                                                                                                                                                                                                                        • https
                                                                                                                                                                                                                                                                                                                                                                                                                        Transport protocol for API-based devices.
                                                                                                                                                                                                                                                                                                                                                                                                                        username no
                                                                                                                                                                                                                                                                                                                                                                                                                          Username used to login to the target device

                                                                                                                                                                                                                                                                                                                                                                                                                          Important

                                                                                                                                                                                                                                                                                                                                                                                                                          Requires pyntc

                                                                                                                                                                                                                                                                                                                                                                                                                          Examples

                                                                                                                                                                                                                                                                                                                                                                                                                          - ntc_get_facts:
                                                                                                                                                                                                                                                                                                                                                                                                                              platform: cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                                              host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                              username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                              password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                              transport: http
                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                          - ntc_get_facts:
                                                                                                                                                                                                                                                                                                                                                                                                                              ntc_host: n9k1
                                                                                                                                                                                                                                                                                                                                                                                                                              ntc_conf_file: .ntc.conf
                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                          - ntc_get_facts:
                                                                                                                                                                                                                                                                                                                                                                                                                              ntc_host: eos_leaf
                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                          - ntc_get_facts:
                                                                                                                                                                                                                                                                                                                                                                                                                              platform: arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                                              host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                              username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                              password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                          - ntc_get_facts:
                                                                                                                                                                                                                                                                                                                                                                                                                              platform: cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                                              host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                              username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                              password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                              secret: "{{ secret }}"
                                                                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                          Return Values

                                                                                                                                                                                                                                                                                                                                                                                                                          Common return values are documented here common_return_values, the following are the fields unique to this module:

                                                                                                                                                                                                                                                                                                                                                                                                                          name despcription returned type sample
                                                                                                                                                                                                                                                                                                                                                                                                                          uptime The device uptime represented as an integer number of strings. success int 1313
                                                                                                                                                                                                                                                                                                                                                                                                                          vendor Vendor of network device. success string cisco
                                                                                                                                                                                                                                                                                                                                                                                                                          uptime_string The device uptime represented as a string format DD:HH:MM:SS. success string 00:00:21:53
                                                                                                                                                                                                                                                                                                                                                                                                                          interfaces List of interfaces. success list ['mgmt0', 'Ethernet1/1', 'Ethernet1/2', 'Ethernet1/3', 'Ethernet1/4', 'Ethernet1/5', 'Ethernet1/6']
                                                                                                                                                                                                                                                                                                                                                                                                                          hostname Hostname of network device. success string N9K1
                                                                                                                                                                                                                                                                                                                                                                                                                          fqdn Fully-qualified domain name. success string N9K1.ntc.com
                                                                                                                                                                                                                                                                                                                                                                                                                          os_version Operating System version on network device. success string 7.0(3)I2(1)
                                                                                                                                                                                                                                                                                                                                                                                                                          serial_number Serial number on network device. success string SAL1819S6LU
                                                                                                                                                                                                                                                                                                                                                                                                                          model Hardware model of network device. success string Nexus9000 C9396PX Chassis
                                                                                                                                                                                                                                                                                                                                                                                                                          vlans List of VLAN IDs. success List ['1', '2', '3', '4']


                                                                                                                                                                                                                                                                                                                                                                                                                          Note

                                                                                                                                                                                                                                                                                                                                                                                                                          Facts to be returned include - uptime (string), uptime (seconds), model, vendor, os_version, serial_number, hostname, fqdn, vlans, interfaces.

                                                                                                                                                                                                                                                                                                                                                                                                                          Note

                                                                                                                                                                                                                                                                                                                                                                                                                          Facts are automatically added to Ansible facts environment. No need to register them.

                                                                                                                                                                                                                                                                                                                                                                                                                          ntc_install_os

                                                                                                                                                                                                                                                                                                                                                                                                                          Synopsis

                                                                                                                                                                                                                                                                                                                                                                                                                          Added in version 1.9.2

                                                                                                                                                                                                                                                                                                                                                                                                                          Set boot options like boot image and kickstart image. Supported platforms include Cisco Nexus switches with NX-API, Cisco IOS switches or routers, Arista switches with eAPI.

                                                                                                                                                                                                                                                                                                                                                                                                                          Options
                                                                                                                                                                                                                                                                                                                                                                                                                          parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                                                                          host yes
                                                                                                                                                                                                                                                                                                                                                                                                                            Hostame or IP address of switch.
                                                                                                                                                                                                                                                                                                                                                                                                                            kickstart_image_file no
                                                                                                                                                                                                                                                                                                                                                                                                                              Name of the kickstart image file on flash.
                                                                                                                                                                                                                                                                                                                                                                                                                              ntc_conf_file no
                                                                                                                                                                                                                                                                                                                                                                                                                                The path to a local NTC configuration file. If omitted, and ntc_host is specified, the system will look for a file given by the path in the environment variable PYNTC_CONF, and then in the users home directory for a file called .ntc.conf.
                                                                                                                                                                                                                                                                                                                                                                                                                                ntc_host no
                                                                                                                                                                                                                                                                                                                                                                                                                                  The name of a host as specified in an NTC configuration file.
                                                                                                                                                                                                                                                                                                                                                                                                                                  password yes
                                                                                                                                                                                                                                                                                                                                                                                                                                    Password used to login to the target device
                                                                                                                                                                                                                                                                                                                                                                                                                                    platform yes
                                                                                                                                                                                                                                                                                                                                                                                                                                    • cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                                                    • arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                                                    • cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                                                    Switch platform
                                                                                                                                                                                                                                                                                                                                                                                                                                    port no
                                                                                                                                                                                                                                                                                                                                                                                                                                      TCP/UDP port to connect to target device. If omitted standard port numbers will be used. 80 for HTTP; 443 for HTTPS; 22 for SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                                      secret no
                                                                                                                                                                                                                                                                                                                                                                                                                                        Enable secret for devices connecting over SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                                        system_image_file yes
                                                                                                                                                                                                                                                                                                                                                                                                                                          Name of the system (or combined) image file on flash.
                                                                                                                                                                                                                                                                                                                                                                                                                                          transport no
                                                                                                                                                                                                                                                                                                                                                                                                                                          • http
                                                                                                                                                                                                                                                                                                                                                                                                                                          • https
                                                                                                                                                                                                                                                                                                                                                                                                                                          Transport protocol for API-based devices.
                                                                                                                                                                                                                                                                                                                                                                                                                                          username yes
                                                                                                                                                                                                                                                                                                                                                                                                                                            Username used to login to the target device

                                                                                                                                                                                                                                                                                                                                                                                                                                            Important

                                                                                                                                                                                                                                                                                                                                                                                                                                            Requires pyntc

                                                                                                                                                                                                                                                                                                                                                                                                                                            Examples

                                                                                                                                                                                                                                                                                                                                                                                                                                            - ntc_install_os:
                                                                                                                                                                                                                                                                                                                                                                                                                                                ntc_host: n9k1
                                                                                                                                                                                                                                                                                                                                                                                                                                                system_image_file: n9000-dk9.6.1.2.I3.1.bin
                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                            - ntc_install_os:
                                                                                                                                                                                                                                                                                                                                                                                                                                                ntc_host: n3k1
                                                                                                                                                                                                                                                                                                                                                                                                                                                system_image_file: n3000-uk9.6.0.2.U6.5.bin
                                                                                                                                                                                                                                                                                                                                                                                                                                                kickstart_image_file: n3000-uk9-kickstart.6.0.2.U6.5.bin
                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                            - ntc_install_os:
                                                                                                                                                                                                                                                                                                                                                                                                                                                ntc_host: c2801
                                                                                                                                                                                                                                                                                                                                                                                                                                                system_image_file: c2800nm-adventerprisek9_ivs_li-mz.151-3.T4.bin
                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                                                                                                                                                                            Return Values

                                                                                                                                                                                                                                                                                                                                                                                                                                            Common return values are documented here common_return_values, the following are the fields unique to this module:

                                                                                                                                                                                                                                                                                                                                                                                                                                            name despcription returned type sample
                                                                                                                                                                                                                                                                                                                                                                                                                                            install_state always dictionary {'sys': 'n5000-uk9.7.2.1.N1.1.bin', 'status': 'This is the log of last installation.\nContinuing with installation process, please wait.\nThe login will be disabled until the installation is completed.\nPerforming supervisor state verification.\nSUCCESS\nSupervisor non-disruptive upgrade successful.\nInstall has been successful. ', 'kick': 'n5000-uk9-kickstart.7.2.1.N1.1.bin'}
                                                                                                                                                                                                                                                                                                                                                                                                                                            contains:
                                                                                                                                                                                                                                                                                                                                                                                                                                            name despcription returned type sample


                                                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                                                            Do not include full file paths, just the name of the file(s) stored on the top level flash directory.

                                                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                                                            You must know if your platform supports taking a kickstart image as a parameter. If supplied but not supported, errors may occur.

                                                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                                                            It may be useful to use this module in conjuction with ntc_file_copy and ntc_reboot.

                                                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                                                            With NXOS devices, this module attempts to install the software immediately, wich may trigger a reboot.

                                                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                                                            With NXOS devices, install process may take up to 10 minutes, especially if the device reboots.

                                                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                                                            Tested on Nexus 3000, 5000, 9000.

                                                                                                                                                                                                                                                                                                                                                                                                                                            Note

                                                                                                                                                                                                                                                                                                                                                                                                                                            In check mode, the module tells you if the current boot images are set to the desired images.

                                                                                                                                                                                                                                                                                                                                                                                                                                            ntc_reboot

                                                                                                                                                                                                                                                                                                                                                                                                                                            Synopsis

                                                                                                                                                                                                                                                                                                                                                                                                                                            Added in version 1.9.2

                                                                                                                                                                                                                                                                                                                                                                                                                                            Reboot a network device, optionally on a timer. Supported platforms include Cisco Nexus switches with NX-API, Cisco IOS switches or routers, Arista switches with eAPI.

                                                                                                                                                                                                                                                                                                                                                                                                                                            Options
                                                                                                                                                                                                                                                                                                                                                                                                                                            parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                                                                                            confirm no
                                                                                                                                                                                                                                                                                                                                                                                                                                              Safeguard boolean. Set to true if you're sure you want to reboot.
                                                                                                                                                                                                                                                                                                                                                                                                                                              host yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                Hostame or IP address of switch.
                                                                                                                                                                                                                                                                                                                                                                                                                                                ntc_conf_file no
                                                                                                                                                                                                                                                                                                                                                                                                                                                  The path to a local NTC configuration file. If omitted, and ntc_host is specified, the system will look for a file given by the path in the environment variable PYNTC_CONF, and then in the users home directory for a file called .ntc.conf.
                                                                                                                                                                                                                                                                                                                                                                                                                                                  ntc_host no
                                                                                                                                                                                                                                                                                                                                                                                                                                                    The name of a host as specified in an NTC configuration file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                    password yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Password used to login to the target device
                                                                                                                                                                                                                                                                                                                                                                                                                                                      platform yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                                                                      Switch platform
                                                                                                                                                                                                                                                                                                                                                                                                                                                      port no
                                                                                                                                                                                                                                                                                                                                                                                                                                                        TCP/UDP port to connect to target device. If omitted standard port numbers will be used. 80 for HTTP; 443 for HTTPS; 22 for SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                                                        secret no
                                                                                                                                                                                                                                                                                                                                                                                                                                                          Enable secret for devices connecting over SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                                                          timer no
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Time in minutes after which the device will be rebooted.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            transport no https
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • http
                                                                                                                                                                                                                                                                                                                                                                                                                                                            • https
                                                                                                                                                                                                                                                                                                                                                                                                                                                            Transport protocol for API-based devices.
                                                                                                                                                                                                                                                                                                                                                                                                                                                            username yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Username used to login to the target device

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Important

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Requires pyntc

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Examples

                                                                                                                                                                                                                                                                                                                                                                                                                                                              - ntc_reboot:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  platform: cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  confirm: true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  transport: http
                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                              - ntc_reboot:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ntc_host: n9k1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ntc_conf_file: .ntc.conf
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  confirm: true
                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                              - ntc_file_copy:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  platform: arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  confirm: true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                              - ntc_file_copy:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  platform: cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  confirm: true
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  timer: 5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  secret: "{{ secret }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                                                                                                                                                              Return Values

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Common return values are documented here common_return_values, the following are the fields unique to this module:

                                                                                                                                                                                                                                                                                                                                                                                                                                                              name despcription returned type sample
                                                                                                                                                                                                                                                                                                                                                                                                                                                              rebooted Whether the device was instructed to reboot. success boolean True


                                                                                                                                                                                                                                                                                                                                                                                                                                                              ntc_rollback

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Synopsis

                                                                                                                                                                                                                                                                                                                                                                                                                                                              This module offers the ability to set a configuration checkpoint file or rollback to a configuration checkpoint file on supported Cisco or Arista switches. Supported platforms include Cisco Nexus switches with NX-API, Cisco IOS switches or routers, Arista switches with eAPI.

                                                                                                                                                                                                                                                                                                                                                                                                                                                              Options
                                                                                                                                                                                                                                                                                                                                                                                                                                                              parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                                                                                                              checkpoint_file no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                Name of checkpoint file to create. Mutually exclusive with rollback_to.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                host yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Hostame or IP address of switch.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ntc_conf_file no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    The path to a local NTC configuration file. If omitted, and ntc_host is specified, the system will look for a file given by the path in the environment variable PYNTC_CONF, and then in the users home directory for a file called .ntc.conf.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ntc_host no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The name of a host as specified in an NTC configuration file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      password yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Password used to login to the target device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        platform yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Vendor and platform identifier.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        port no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          TCP/UDP port to connect to target device. If omitted standard port numbers will be used. 80 for HTTP; 443 for HTTPS; 22 for SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          rollback_to no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Name of checkpoint file to rollback to. Mutually exclusive with checkpoint_file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            secret no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Enable secret for devices connecting over SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              transport no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • https
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Transport protocol for API. Only needed for NX-API and eAPI. If omitted, platform-specific default will be used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              username yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Username used to login to the target device.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Important

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Requires pyntc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Examples

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - ntc_rollback:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ntc_host: eos1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    checkpoint_file: backup.cfg
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                - ntc_rollback:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ntc_host: eos1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    rollback_to: backup.cfg
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Return Values

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Common return values are documented here common_return_values, the following are the fields unique to this module:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                name despcription returned type sample
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                status Which operation took place and whether it was successful. success string rollback executed
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                filename The filename of the checkpoint/rollback file. success string backup.cfg


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Note

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This module is not idempotent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ntc_save_config

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Synopsis

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Added in version 1.9.2

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Save the running configuration as the startup configuration or to a file on the network device. Optionally, save the running configuration to this computer. Supported platforms include Cisco Nexus switches with NX-API, Cisco IOS switches or routers, Arista switches with eAPI.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                host yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Hostame or IP address of switch.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  local_file no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Name of local file to save the running configuration. If omitted it won't be locally saved.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ntc_conf_file no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      The path to a local NTC configuration file. If omitted, and ntc_host is specified, the system will look for a file given by the path in the environment variable PYNTC_CONF, and then in the users home directory for a file called .ntc.conf.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ntc_host no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        The name of a host as specified in an NTC configuration file.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        password yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Password used to login to the target device.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          platform yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Vendor and platform identifier.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          port no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            TCP/UDP port to connect to target device. If omitted standard port numbers will be used. 80 for HTTP; 443 for HTTPS; 22 for SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            remote_file no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Name of remote file to save the running configuration. If omitted it will be saved to the startup configuration.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              secret no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Enable secret for devices connecting over SSH.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                transport no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • http
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • https
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Transport protocol for API. Only needed for NX-API and eAPI. If omitted, platform-specific default will be used.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                username yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Username used to login to the target device.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Important

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Requires pyntc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Examples

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - ntc_save_config:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      platform: cisco_nxos_nxapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - ntc_save_config:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ntc_host: n9k1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - ntc_save_config:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      platform: arista_eos_eapi
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      remote_file: running_config_copy.cfg
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      transport: https
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  # You can get the timestamp by setting get_facts to True, then you can append it to your filename.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  - ntc_save_config:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      platform: cisco_ios
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      host: "{{ inventory_hostname }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      username: "{{ username }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      password: "{{ password }}"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      local_file: config_{{ inventory_hostname }}_{{ ansible_date_time.date | replace('-','_') }}.cfg
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Return Values

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Common return values are documented here common_return_values, the following are the fields unique to this module:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  name despcription returned type sample
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  local_file The local file path of the saved running config. success string /path/to/config.cfg
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  remote_file The remote file name of the saved running config. success string config_backup.cfg
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  remote_save_successful Whether the remote save was successful. May be false if a remote save was unsuccessful because a file with same name already exists. success bool True


                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Note

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  This module is not idempotent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ntc_show_command

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  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
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  command yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Command to execute on target device
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    connection no ssh
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • ssh
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • offline
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    connect to device using netmiko or read from offline file for testing
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    delay no 1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Wait for command output from 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
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        host no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          IP Address or hostname (resolvable by Ansible control host)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          index_file no index
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            name of index file. file location must be relative to the template_dir
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            password no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Password used to login to the target device
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              platform yes ssh
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Platform FROM the index file
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                port no 22
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  SSH port to use to connect to the target device
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  secret no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Password used to enter a privileged mode on the target device
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    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
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      username no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Username used to login to the target device

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Important

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Requires netmiko

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Important

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Requires textfsm

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Important

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Requires terminal

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Examples

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        # get vlan data
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - ntc_show_command:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            connection=ssh
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            platform=cisco_nxos
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            command='show vlan'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            username={{ username }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            password={{ password }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        # get snmp community
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        - ntc_show_command:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            connection=ssh
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            platform=cisco_nxos
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            command='show snmp community'
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            username={{ username }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            password={{ password }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            secret:{{ secret }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ansible-snmp Modules (mult-vendor)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        These docs were dynamically created from the modules that can be found here.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        snmp_device_version

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Synopsis

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Returns vendor, os and version of an SNMP device.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        Options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        authkey no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Authentication key, required if version is 3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          community no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The SNMP community string, required if version is 2c
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            host yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Typically set to {{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              integrity no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • md5
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • sha
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Hashing algoritm, required if version is 3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              level no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • authPriv
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              • authNoPriv
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Authentication level, required if version is 3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              port no 161
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                SNMP port number
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                privacy no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • des
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • 3des
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • aes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • aes192
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • aes256
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                Encryption algoritm, required if level is authPriv
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                privkey no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Encryption key, required if version is authPriv
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  username no
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Username for SNMPv3, required if version is 3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    version yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • 2c
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    • 3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    SNMP Version to use, 2c or 3

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Important

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Requires nelsnmp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Examples

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    # Get device info with SNMPv2
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    - snmp_device_version: host={{ inventory_hostname }} version=2c community=public
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    # Get device info with SNMPv3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    - cisco_snmp_save_config:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        host={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        version=3
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        level=authPriv
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        integrity=sha
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        privacy=aes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        username=snmp-user
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        authkey=abc12345
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        privkey=def6789
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    napalm Modules (mult-vendor)

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    These docs were dynamically created from the modules that can be found here.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    These docs were dynamically created from the modules that can be found here.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    napalm_install_config

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Synopsis

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Added in version 1.0.0

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Gathers facts from a network device

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    Options
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    parameter required default choices comments
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    dev_os yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      OS running the device
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      hostname yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        IP or FQDN of the device you want to connect to
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        password yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          Password
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          username yes
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Username

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Important

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Requires napalm

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Examples

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            - napalm_install_config:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                hostname={{ inventory_hostname }}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                username=dbarroso
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                dev_os={{os}}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                password=p4ssw0rd
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            About Page

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            About these modules

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Frequently Asked Questions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            Here are some commonly-asked questions and their answers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This is question number 1?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This is the answer to question 1, do code blocks like this:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ntc-ansible:
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              command: fake command
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            This is question number 2?

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            The answer to this question doesn’t use a code block.