Hi,
Why don't you use only ${d} in methods?
methods:
"any" usebundle => subfoo("${d}");
I think you would get expected results.
Cheers,
--Nakarin
On Dec 2, 2009, at 9:28 PM, [email protected] wrote:
> Thanks for the tip Mark. Using this method again for something different
> get's me some unexpected results:
> body common control {
> bundlesequence => { "foo" };
> }
>
> bundle common g {
> vars:
> sunos_5_10::
>
> "svc_cmd" string => "/usr/sbin/svcadm",
> comment => "Service start/stop command.";
>
> "svc_sts" string => "/usr/bin/svcs",
> comment => "Service status command";
> }
>
> bundle agent foo {
> vars:
> "d" slist => { "1.one","1.two","1.three" };
>
> methods:
> "any" usebundle => subfoo("@{foo.d}");
> }
> bundle agent subfoo(d){
> vars:
> "x" string => canonify("${d}");
>
> reports:
> sunos_5_10::
> "${x}";
> }
>
> Results:
> bash-3.00# cf-agent -Kf ./foo.cf
> R: 1_three
>
> Expected results:
> R: 1_one
> R: 1_two
> R: 1_three
>
> Am I still thinking in procedures?
>
> Sincerely,
> --
> Neil Watson
> 416-673-3465
>
>
> CONFIDENTIALITY WARNING
> This communication, including any attachments, is for the exclusive use of
> addressee and may contain proprietary and/or confidential information. If you
> are not the intended recipient, any use, copying, disclosure, dissemination
> or distribution is strictly prohibited. If you are not the intended
> recipient, please notify the sender immediately by return e-mail, delete this
> communication and destroy all copies.
>
> AVERTISSEMENT RELATIF À LA CONFIDENTIALITÉ
> Ce message, ainsi que les pièces qui y sont jointes, est destiné à l’usage
> exclusif de la personne à laquelle il s’adresse et peut contenir de
> l’information personnelle ou confidentielle. Si le lecteur de ce message n’en
> est pas le destinataire, nous l’avisons par la présente que toute diffusion,
> distribution, reproduction ou utilisation de son contenu est strictement
> interdite. Veuillez avertir sur-le-champ l’expéditeur par retour de courrier
> électronique et supprimez ce message ainsi que toutes les pièces jointes.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine