Let’s say we have a scenario where we want to add a command to all access ports in 10 switches. How do I make the configuration template go through every interface in each switch and detect if it’s an access port and then add a command to those ports?
In LMS we used to do something like:
precedence:
Interface [#.*Ethernet.*#]
+ switchport access
command:
#same interface as above#
+ switchport port-security
-------------------------------
In the Configuration Templates the closest thing I found was this:
#set($valueOfChar= "-")
#if($interfaceName.indexOf($valueOfChar)== -1)
interface $interfaceName
#else
interface range $interfaceName
#end
#if($configureInterfacesAs == "access")
switchport mode access
switchport access vlan $vlanId
#else
switchport mode trunk
#end
But that requires that input about the interfaces.
Also does anyone know if there is a website that describes the variables / language used? Or a guide or something that can be downloaded / bought that will explain "everything" we need to know to be able to make "advanced" configuration templates.
In Advance:
Thank you very much to anyone out there who has input/help on this one.