The bundlesequence is not really for repetition. The best way to do this is to
write
body common control
{
bundlesequence => { share };
}
bundle agent share
{
methods:
"one" usebundle =>addshare("share1");
"two" usebundle =>addshare("share2");
}
bundle agent addshare(name)
{
reports:
linux::
"this is $(name)";
}
Grzegorz Marszałek wrote:
> Hello!
>
> I'm new to cfengine and I'm trying to understand it's concepts.
>
> One thing I'd like to ask about are parametrized bundles. I can write
> in promises.cf something like this:
>
> body common control {
> bundlesequence => { addshare("share1"),addshare("share2") };
> }
> bundle agent addshare(name) {
> reports:
> linux::
> "this is $(name)"
> }
>
> but... I get reports "this is share1" - and only this report... I've
> tested it with few other bundles and it seems, that they got included
> only once - so first addshare("share1") is executed, but second one
> not... It seems that bundle is evaluated, but no statements are
> executed. Is that intended behaviour, or I do something wrong? I use
> cfengine 3.0.2.
>
> Cheers
> ---
> Grzegorz Marszałek
> [email protected]
>
>
> _______________________________________________
> Help-cfengine mailing list
> [email protected]
> https://cfengine.org/mailman/listinfo/help-cfengine
--
Mark Burgess
-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway
Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine