Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
    "name": "IOS - Configuration Best Practices",
    "description": "A configuration set to configure the IOS device, by enabling and disabling various services and features.",
    "filter":
    {
        "os_info.os": "IOS"
    },
    "notify": { "email": "you@company.com" },
    "error_handling":
    {
        "match": [ "/Invalid input detected/" ],
        "break_on_error": false
    },
    "pre-commands":
    [
        "_reload_in 5"
    ],
    "commands":
    [
    "no ip http server",
    "no ip http secure-server",
    "no ip finger",
    "no service finger",
    "no service udp-small-servers",
    "no service tcp-small-servers",
    "no boot network",
    "no service config",
    "service password-encryption",
    "service timestamps debug datetime msec",
    "service timestamps log datetime msec",
    "service sequence-numbers",
    "service tcp-keepalives-in",
    "service tcp-keepalives-out",
    "no ip source-route",    
    "line con 0 ",
    "exec-timeout 10 0",
    "exit",
    "line vty 0 4",
    "exec-timeout 10 0",
    "exit"
    ],
    "post-commands":
    [
        "reload cancel"
    ]
}

Config Set Parameters

Since opConfig 4.2.6 it is possible to use parameters in a config set. 

The parameters are global to commands, pre commands or post commands, and are specified with the preceded by $

Example

Image Added

Using a config set with parameters

cli Example

Using the cli tool opconfig-cli, you can specify parameters to push a config set using parameter.parametername, like:

Code Block
./opconfig-cli.pl act=push_configset name="my configset" parameter.interface=Tunnel100 parameter.description="Configuration change example" debug=2

GUI Example

Using the GUI, if a config set has parameters, you will have a second modal window to specify all the needed parameters:

Image Added

Image Added