Would be nice to be able to use variables in Scripts so you can remediate things under multiple interfaces or lines.
Example:
If you have a compliance check that is found under multiple interfaces, it can run the script on all the interfaces it found the violation on.
Check:
has mls qos trust dscp
Interface gigabitEthernet 1/1
(does not have mls qos trust dscp)
Interface gigabitEthernet 1/2
mls qos trust dscp
Interface gigabitEthernet 1/3
(does not have mls qos trust dscp)
Script:
config t
@variableinterface
mls qos trust dcp
end
wr me
Would run the script on the two interfaces that failed.
OR if you have a multiple line check, it would fix it on what line failed.
Example
Check config start "^line\s(2|66|vty*)"
if it failed on line 2, the script would run on line 2.