开发者

Need recommendation for templating configuration files and auditing

I am looking for a template engine for pushing and pulling data from configuration files. To be more specific, Cisco router configuration files. My goal has two parts

1) To be able to template my router config and insert unique data (hostname, interface IP's, ...etc) from an authoritative source (Mysql). Afterwards, I have a mechanism for loading the configs.

2) Once a device is configured and placed into production, I need a way of auditing against the latest version of my template. 开发者_如何学GoThis would allow us to discover when operators change the running configuration.

Thoughts?


Let's take the simplest approach.

  • Use whatever language and templating engine you want, write a script that generates a config by e.g. a device name.

  • To check, generate a config for a device, download the actual config from that device, run diff. Mail the differences, if any, to people in charge of auditing.

The templating engine makes no difference in your case: you have no performance constraints, it seems. I'd take Python + Mako / Jinja / Cheetah, or Ruby + Rails, but even a bash + sed script could work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜