[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
templating support for cfperl
From: |
Ted Zlatanov |
Subject: |
templating support for cfperl |
Date: |
27 Jul 2004 14:01:37 -0400 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
The discussion over the last few months about templating in cfengine
convinced me to try a templating experiment in cfperl. The experiment
is only in the CVS version of cfperl right now, but it basically
allows you to do something like this:
# example /etc/sudoers template
root ALL=(ALL) ALL
[% IF linux %]
linuxuser ALL=(ALL) ALL
[% END %]
[% IF solaris %]
solarisuser ALL=(ALL) ALL
[% END %]
# deploy.cf file
control:
any::
actionsequence = ( deploy )
deployment engine templating-engine = template
deploy:
any::
/tmp/sudoers.1 from templating-engine /tmp/sudoers.tmpl link = 0 preserve = 1
force = 1
and that works very well. It uses the Template Toolkit, which is very
nice for this sort of application. Right now the templating is in the
'proof of concept' stage and only in the cfperl CVS repository as I
mentioned, but I thought I'd bring it up in case anyone is interested
in this capability (you don't need to use any of the other cfperl
features to do this).
Let me know if you want to test and use the templating support. I'm
already using it at my site and I think it's very convenient. It
achieves true convergent file editing for many cases, although it's
not as smart as cfengine regarding file updates and such.
Thanks
Ted
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- templating support for cfperl,
Ted Zlatanov <=