IMHO, it should work. To expand 'host_list', you might need to create a small 
test bundle like the following;

bundle agent test
{
 vars:
   "ls_1"        string => execresult("/bin/ls -1 
/srv/cfengine-masterfiles/stage/datafiles/","noshell");
   "host_list" slist    => splitstring("$(ls_1)","\s","10000");
 reports:
  cfengine_3::
   "--> $(host_list)";
}

Cheers,
--Nakarin

On Jun 22, 2010, at 10:24 AM, Andreas Dan Larsson wrote:

> Hi guys,
> 
> Im trying to get the server to serve individual folders to my clients for 
> distributing sensitive data. The folder is named as the fully qualified 
> hostname of the client who is supposed to access it. Im using community 
> edition 3.0.4 from debian.
> 
> Shouldn't this work? And is there a way to debug this? I would like to see 
> what this expands to.
> 
> Best Regards,
> Andreas Larsson
> Axis Communications
> 
> -------------------------------------------------
> 
> bundle server access_rules()
> {
> 
> vars:
> 
>        "ls_1"  string          => execresult("/bin/ls -1 
> /srv/cfengine-masterfiles/stage/datafiles/","noshell");
>        "host_list" slist       => splitstring("$(ls_1)","\s","10000");
> 
> access:
> 
>  "/srv/cfengine-masterfiles/stage/datafiles/$(host_list)/"
> 
>    admit   => { "$(host_list)" };
> 
> }                            
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine

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

Reply via email to