This runs through all of my Cisco switch ports and ensures they are compliant with my configuration templates. It then builds pretty reports and emails them along with a CSV of the info. I'm building the reporting piece based on my reporting blog post here. The good part about this automation is that it will look at the full interface config, no matter what is added, be it vlans, port security, dot1x, etc., it will catch and compare it all.
The premise here is that all interfaces should contain an identifying description like: adminuser, mfguser, printer, ap. Each one of these description types will have a template they should match. So in the above example there would be four base templates. Of course each site would have a different VLAN, but that's the good part of using a Jinja2 template, I can do variable replacement on the VLAN portion very easily.
Blog post with walkthrough and files here: [ Ссылка ]
![](https://i.ytimg.com/vi/pD4O1gggXz4/maxresdefault.jpg)