On Thu, Jul 26, 2012 at 10:38 AM, Lukas Zuercher this.is.too.boring@gmail.com wrote:
Hi,
I wanted to create something like that:
#try #include '/stuff/$name' #except do something else #end try
safe_templating is set to false.
The reason is that I want to try to include a file with some informations and if it does not exist, it should to a default action
The rendered ks looks as follows: # Unable to read /tmp/test123
The except part is never reached, even syntactical incorrect cobbler stuff is ignored.
Any hints what went wrong?
The templates are rendered before the system ever sees them, but it seems here that you're trying to include a file being generated later? It might be helpful to pastebin/include your kickstart or snippets to see what exactly you're trying to do.
You might want to use $SNIPPET("path/$file") instead of #include too, though you could only use snippets in the /var/lib/cobbler/snippets directory.