On 11/09/12 15:51, no-re...@cfengine.com wrote:
>
> Implicit iteration over non-local variables was added in 3.3.0.
>
> https://github.com/cfengine/core/blob/3.3.x/ChangeLog
well, that is pretty clear. Thanks for everyones input, I have a
workaround in place until we can upgrade. We are migrating
Forum: CFEngine Help
Subject: Re: iterating over a global list
Author: Authority
Link to topic: https://cfengine.com/forum/read.php?3,27280,27286#msg-27286
Implicit iteration over non-local variables was added in 3.3.0.
https://github.com/cfengine/core/blob/3.3.x/ChangeLog
On 09/11/2012 08:57 AM, no-re...@cfengine.com wrote:
> The version mentioned, 3.2.1, is pretty old. You might consider an upgrade.
> I am not certain that iteration over foriegn lists will work. Typical
> practice is to make it local then iterate over that.
> var:
>'local_list' slist => {
Forum: CFEngine Help
Subject: Re: iterating over a global list
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27280,27283#msg-27283
It is best practice to have common bundles in the bundlesequence. While the
agent will define variables and classes from a common bundle
On 11/09/12 13:59, Seva Gluschenko wrote:
> Gregory,
>
> Pay your attention to common bundles which are the only way to define
> global variables, i.e.:
eh? I thought all variables had global scope but they just needed to be
qualified with the bundle name in which they are defined?
G
>
> bundle
Gregory,
Pay your attention to common bundles which are the only way to define
global variables, i.e.:
bundle common g
{
vars:
...
}
Meanwhile, there's no need to include common bundles into the bundlesequence.
--
Best,
Seva
2012/9/11 Gregory Matthews :
> what is wrong here?
>
> body common
what is wrong here?
body common control
{
bundlesequence => { "g", "test" };
inputs => { "cfengine_stdlib.cf" };
}
bundle agent g
{
vars:
"list" slist => { "1", "2", "3" };
}
bundle agent test
{
reports:
"debug: $(g.list)";
}
results in:
R: debug list: $(g.list)
defining the list lo