Forum: CFEngine Help
Subject: Re: bundles with the same name
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,25854,25855#msg-25855

Hi Greg,

I don't think this is a good practice, because bundles of type common can also 
be included in the bundlesequence. In my testing, in this case only the first 
defined bundle will be executed, This could lead to unpredictable results. 
These two examples behave differently:


body common control
{
        bundlesequence => { "foo" };
}

bundle common foo
{
  vars:
      "l"   slist => { "a", "b" };
  reports:
    cfengine::
      "List2: ${l}";
}

bundle agent foo
{
  vars:
      "l"   slist => { "c", "d" };
  reports:
    cfengine::
      "List1: ${l}";
}



body common control
{
        bundlesequence => { "foo" };
}

bundle agent foo
{
  vars:
      "l"   slist => { "c", "d" };
  reports:
    cfengine::
      "List1: ${l}";
}

bundle common foo
{
  vars:
      "l"   slist => { "a", "b" };
  reports:
    cfengine::
      "List2: ${l}";
}


What sort of convenience does this provide to you?

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

Reply via email to