I have a template that will make an addition to all GigabitEthernet interfaces on a switch. What I need though, is how can I change a line of config under an interface ONLY if it exists?
ONLY if it exists, I want to change 'authentication timer reauthenticate 7200' to 'authentication timer reauthenticate server'.
I'm thinking nested if statements, but I'm not sure what to put in the second if statement. I dont know how to write the syntax for the logic "if 'authentication timer reauthenticate 7200' exists, then change to 'authentication timer reauthenticate server'.
#foreach( $interfaceName in $interfaceNameList )
#if( $interfaceName.startsWith("GigabitEthernet") )
interface $interfaceName
#if( ???????? )
authentication timer reauthenticate server
#end
#end