Forum: CFEngine Help
Subject: edit global list
Author: schattenfell
Link to topic: https://cfengine.com/forum/read.php?3,22770,22770#msg-22770

Hello,

by design it seems not to be possible, to edit global lists. E.g. I create a 
list in a bundle (common or agent).


bundle common v
{
   vars:
      "my_module_list_global" slist  => { "loop" }, policy => "overridable";
}


Now I want to add literals to this global list in the "vars:" - section of 
other bundles. But here only a local use is possible like:


"my_module_list_local" slist => {
                                   @(v.my_module_list_global),
                                   "drbd"
                                 },
                                 policy => "overridable";


So my intention ist the following: I have different bundles of type agent for 
different services, that I want to configure.
In every bundle I want to be able to collect information about needed kernel 
modules.
At the end a bundle agent called modules shall use this global list, to create 
/etc/modules from it.

I know I could e.g. define classes in the different service bundles and check 
them in the module bundle, but then I always have to edit the module bundle, if 
I want to add a new service bundle with the need of a specific kernel module.

Does anyone have an idea, how I can define a global var / list, that is 
acessible from different bundles for writing?
Or another way to deal with the mentionned problem?

Thanks a lot.

Best wishes
Michael

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to