On Wed, 02 Mar 2011 00:15:01 -0800, petermity <[email protected]> wrote: > How can I force a failure on a bad condition, so that "cobbler > profile getks" fails with a traceback (and the actual kickstart > fails, and validateks fails too)? > > For instance, I don't want to proceed if some variable is not set: > > #if $getVar('myvar','') != '' > # ... do something with $myvar > #else > # Somehow throw an error to abort, e.g.: > #error "The profile must define 'myvar'" > #end if
I believe the directives you need are #assert and #raise. Though they are probably disabled by safe templating. I'll include one of them in the next release of cobbler (along with the ability to modify the whitelist in the settings file). -- Scott Henson Red Hat CIS Operator WVU Alum BSAE/BSME
pgpLz9oytcv7f.pgp
Description: PGP signature
_______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
