sauer wrote:
> I've been meaning to extend that approach and try making a parametrized
> bundle which takes the varaible as input (say, "bundle agent
> overrideable(varname)"), but I've been too busy to figure out how CFEngine
> handles variable namespacing when I call the same bundle name several times.
That's an interesting possible work-around. The drawback is it negates the
advantages of having separate local name spaces.
It'd be cool if we could define our own functions:
function agent variable_or_default( varname, default )
{
classes:
"have_varname" expression => isvariable("$(varname)");
return:
have_varname:: "$(varname)";
!have_varname:: "$(default)";
}
bundle agent test
{
vars:
"my_variable" string => variable_or_default( "otherbundle.variable",
"default value" );
}
--
Tod Oace, Intel Corporation <[email protected]>
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine