System Administration With Revision Control
I have to disagree with the hard-won wisdom Joseph documents in this blog entry. Altough I 100% support his idea of version control for config files. Both his "Use mapfiles" and "Avoid generating configuration files" are 2 practices that I have to disagree with.
Don't use map files, use actual subdirs and map multiple trees on top of eachother, Create trees such as ALL , HOSTNAME , HOSTNAME-X , etc and layer them on top of eachother for the final filesystem.
ALL is written first, then hostname and finally hostname-x, so if your CLUSTERNODE13 has a specific config file /etc/murphy that differs from all other nodes it sits in overrides/CLUSTERNODE13/etc/murphy.
In the original sugestion with map files.. how would you map different content based on a server to the same filenames ? You'd end up getting a big bunch of similarly named files in 1 directory, ready for the unattentive eye to edit the wrong file. This is the way how e.g. SystemImager deploys config files, the systemimager overrides mechanism uses rsync to accomplish this.
Do generate config files.
You don't want to spend time modifying config files that a computer can generate for you. If you have 200+ machines and you need to create or configure a service that includes a reference to
an ip address or a hostname based on the actual machine a script or template wil much easier calculate the n+k ip address or hostname-n-k and do it faultless , where as by the 123th config file you edit manually you will have run out of coffee and you'll start doing sloppy cut and pastes.
And yes modern configurations do include a .d mechanism, but not for all config files, yet. A
overrides/ALL/etc/logrotate.d/messages overrides/DATABASE/etc/logrotate.d/mysql
will do just fine.