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