On Mon, May 4, 2009 at 12:25 PM, Michael DeHaan mdehaan@redhat.com wrote:
Jeff Schroeder wrote:
On Mon, May 4, 2009 at 12:17 PM, Michael DeHaan mdehaan@redhat.com wrote:
I'd like to teach Cobbler about how to use other templating engines, so that folks who have preferences can use them.
I'm thinking the easiest way to do this might be to assume a template is (whatever is marked as the default engine in settings, which is probably Cheetah) and then allow the template language to be marked at the top of a file with something like
"#template:cheetah"
OR:
"#template:mako"
Basically similar to the bash shebang (#!/bin/interpreter)
And if that is found, throw that line away and then pass the rest to the template.
Mako isn't currently available in EPEL 4/5, so I'm not sure how much we could actually use for anything stock until we've got that resolved. I put a question out to the Fedora maintainer.
We could also try to put in some logic to guess the template language if not specified though I see that as being potentially error prone.
Note were's also already Django Templating in cobbler-web, so that's a logical template to support, though we are probably not going to require the django framework for cobbler (not: cobbler-web), though if we're not actually using it, and just want the templating that's not so terribly wrong either (given it's in EPEL).
Thoughts?
Two words, "Support nightmare".
Three words: uncertain Cheetah future. Six words: You wouldn't have to use them. Twenty two words: Cheetah hasn't had a release since 2007. Some hedging of bets seems important if we say, run into 2.6/3000 Python bugs.
I've already asked the Fedora maintainer about whether we can move to the "Community Cheetah" release/fork though from the Cheetah list it's a little unclear about who's owning it moving forward.
Oh sorry please mention the reasoning behind a change like that next time :)
It sounds perfectly reasonable but also sounds like a huge pain point. That seems to be the only downside of cobbler. Every major change has big breakage from the last version. Just my two cents.