On Tue, Mar 24, 2009 at 12:27 PM, Tom Brown tom@ng23.net wrote:
If you have any real questions feel free to ask them on this list. In our cobbler deployment we use the --template-files for a 1/2 dozen or so files. It works great and you can just "koan -u" to fix things once you break them from the server.
i guess if someone could give an example about how say a httpd.conf could be supplied and associated with a particular profile that would be great and also the steps to get that onto the client, although from the docs i have read that seems pretty clear.
Make a directory like /etc/cobbler/templates and put your httpd.conf in there. Then you could do a command like this: cobbler system edit --name webserver1 --template-files="/etc/cobbler/templates/httpd.conf.webfarm=/etc/httpd/conf/httpd.conf"
On a recent cobbler build, there is a snippet called koan_environment that will put /etc/profile.d/cobbler.sh to make koan magically work by always exporting COBBLER_SERVER. From the webserver you can then just run "koan -u" and it will download the files for you. This should be automatically done at the end of the kickstart for new builds if you have the "download_config_files" snippet towards the end of your kickstart post.
Does this make sense? Cheetah templating can make this a lot more advanced, but that is how you can do basic file distribution with cobbler. We do light cheetah templating with the files but nothing crazy.
A HUGE gotcha with these files is you need to put "#raw" at the beginning of the script (before the shebang line) and "#end" at the very end where you want non-cheetah code. Test this out with your templates. Does that make sense?