Michael DeHaan wrote: > Dan Guernsey wrote: > >> You can use the alternate SNIPPET syntax to do this: >> >> $SNIPPET($mysnippet) >> >> Although SNIPPET uses #include, there are some important differences: >> 1) SNIPPET will search for profile and system-specific SNIPPETS (See >> Advanced Snippets on the Wiki) >> 2) SNIPPET will include the namespace of the included file, so >> anything #def'ed in the snippet will be accessible to the main kickstart >> file. #include will not do this. >> >> > > Very good. I'll see about updating the templates to use your new syntax > just to make that clearer. > > Cool > #set global is a workaround for 2, correct? > There is no need for a workaround for symbols created with #def. There is a need for symbols created with #set. This workaround is #set global. FYI: #def global is not allowed by cheetah. > --Michael > > >> ~ >> Dan >> >> Simon Woolsgrove wrote: >> >> >>> Is it possible to select a snippet using a variable e.g. >>> SNIPPET::$mysnippet ? When I try this nothing is loaded even though the >>> variable is set, I am guessing cheetah/cobbler is not rendering these ? >>> >>> I want a way to pass application configs and user contributed scripts into >>> %post without having to generate a profile for each due to the number of >>> different combinations. >>> >>> Currently I am passing the requested configs via --ksmeta "appconfig=fred" >>> and using #include $appconfig ... the imported files still appear to be >>> rendered by cheetah, is there any difference between an #include vs SNIPPET >>> ? >>> >>> Cheers, >>> Simon >>> _______________________________________________ >>> cobbler mailing list >>> [email protected] >>> https://fedorahosted.org/mailman/listinfo/cobbler >>> >>> >>> >> _______________________________________________ >> cobbler mailing list >> [email protected] >> https://fedorahosted.org/mailman/listinfo/cobbler >> >> > > _______________________________________________ > cobbler mailing list > [email protected] > https://fedorahosted.org/mailman/listinfo/cobbler >
_______________________________________________ cobbler mailing list [email protected] https://fedorahosted.org/mailman/listinfo/cobbler
