Hello,

I'm not sure you can use a vars section in a bundle server

I would suggest that you define a bundle common, and define your list 
there, and use it in your server control and access_rules, like :

bundle common my_definitions {
vars:
"sdm_host_list" slist => { "255.3.30.102", "255.3.30.43" };
}

body server control
{

allowallconnects        =>  {
                             @{my_definitions.sdm_host_list}, "255.3.30.207",
"255.3.30.152", "255.3.30.201","255.3.30.45", "255.3.30.108", "255.3.30.105"
                             };

(...)


Regards

Nicolas CHARLES
Normation SAS - http://www.normation.com
44 rue Cauchy – 94110 ARCUEIL
+33 (0)1 83 62 26 96  - +33 (0)6 14 63 25 18


On 01/02/2011 01:04, Sandra Wittenbrock wrote:
> Hello,
>
> I am trying to use a list of servers, so I don't have to enter the
> servers individually.  Unfortunately, the variable sdm_host_list is not
> working for me.  Any pointers would be appreciated.
>
> Currently I have in serverd.cf:
>
> body server control
> {
>
> allowallconnects        =>  {
>                              "${sdm_host_list}", "255.3.30.207",
> "255.3.30.152", "255.3.30.201","255.3.30.45", "255.3.30.108", "255.3.30.105"
>                              #"${g.sdmhosts}", "datagrid_lbl_gov"
>                              };
> allowconnects        =>  {
>                              "${sdm_host_list}","255.3.30.207",
> "255.3.30.152", "255.3.30.201", "255.3.30.45", "255.3.30.108",
> "255.3.30.105"
>                              #"dmx17.lbl.gov", "255.3.30.207"
>                              };
> maxconnections =>  "30";
> logallconnections =>  "true";
> trustkeysfrom   =>  {"${sdm_host_list}","255.3.30.207",
> "255.3.30.152","255.3.30.201", "255.3.30.45", "255.3.30.108" ,
> "255.3.30.105"};
>
> allowusers      =>  {"root"};
>
> }
>
>
> bundle server access_rules {
>       vars:
>
>           "sdm_host_list" slist =>  {  "255.3.30.102", "255.3.30.43"  };
>
>       access:
> # /var/lib/cfengine3/masterfiles
>           "${g.masterfiles}"
>               admit =>  { "${sdm_host_list}","255.3.30.45",
> "255.3.30.201", "255.3.30.108", "255.3.30.105","255.3.30.207"};
> #,"255.3.30.102" };
> # /var/lib/cfengine3/inputs
>           "${g.inputs}"
>               admit =>  { "${sdm_host_list}","255.3.30.45",
> "255.3.30.201","255.3.30.108" , "255.3.30.105", "255.3.30.207"};
> #,"255.3.30.102"};
>           "/etc"
>               admit =>  { "${sdm_host_list}","255.3.30.45", "255.3.30.201"
> ,"255.3.30.108", "255.3.30.105", "255.3.30.207"};
> #,"255.3.30.102"};
>           "/opt"
>               admit =>  { "${sdm_host_list}","255.3.30.45",
> "255.3.30.201", "255.3.30.207"};
> #,"255.3.30.102" };
>           "/var/lib/cfengine3/masterfiles/cf-failsafe.sh"
>               admit =>  { "${sdm_host_list}","255.3.30.45", "255.3.30.201"
> ,"255.3.30.108", "255.3.30.105", "255.3.30.207"};
> #,"255.3.30.102"};
>           "/var/lib/cfengine3/bin/cf-failsafe.sh"
>               admit =>  { "${sdm_host_list}","255.3.30.45", "255.3.30.201"
> ,"255.3.30.108", "255.3.30.105", "255.3.30.207"};
> #,"255.3.30.102"};
>           "/var/lib/cfengine3/masterfiles/conf/sshd_config"
>               admit =>  { "${sdm_host_list}","255.3.30.45", "255.3.30.201"
> ,"255.3.30.108", "255.3.30.105", "255.3.30.207"};
> #,"255.3.30.102"};
>
>
> }
>
>
>
>
>
>
>
> Regards,
>
> Sandra
> _______________________________________________
> 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