Version 3 (modified by dozzie, 10 years ago) (diff)




Imagine that you have many servers. Imagine that each of the server holds similar set of services, among the other tasks. These services could be not a critical ones from business point of view, but very useful for you as an administrator. Examples of such services include SSH daemon, mail system (crontab logs anyone?), syslog, backup agent, cron entries or sudo.

Now imagine that you want these services configured similarly across your servers; that the configs on each server are almost-identical. Almost. Differences will probably consist of very few variables, like hostname, LDAP server address and stuff like that. It would be great if you had a sort of template that gets filled with host's parameters just before being used as a config.

This is the place where cfgen appears on the scene.

Main cfgen's use is to mix config templates with host-dependent variables and produce ready-to-use configs, separate one for each known host.

Template system used for this is Template::Toolkit, and host-dependent variables are stored in YAML files.

How to download

git clone

How to build


How to use

Full-blown generator environment


Quick run

This way of running cfgen is not that quick in the long run, but if you want just to check if your Template::Toolkit construction works, it's good enough, yet you don't have to prepare full build environment.