On 20-10-10 15:20, Seva Gluschenko wrote:
> Bas,
>
> the truth is, package_method is the compound body, it can't be
> referenced by a variable.
>
Seva,

   That is a pitty, would save some code. Thanks for the info.

regards,


> 2010/10/20 Bas van der Vlies<b...@sara.nl>:
>> version used: 3.1.0b1
>>
>> I could not find it, but i get these error with this bundle with and
>> without "" for the variable package_method:
>> {{{
>> Undeclared promise body "$(package_method)()" was referenced in a promise
>> cf-agent was not able to get confirmation of promises from cf-promises, so
>> going to failsafe
>> }}}
>>
>>
>> Can cfengine handle this or must i use another data type or make use of a
>> function?
>>
>>
>> This a small example. We use this bundle for multiple OSes.
>> {{{
>> bundle agent config_system_access(source)
>> {
>>        vars:
>>
>>               debian::
>>                  "package_method"        string =>  "apt";
>>
>>                  "package_list" slist =>  {
>>                         "libpam-ldapd",
>>                         "libnss-ldapd",
>>                         "nslcd",
>>                         "ldap-utils"
>>                          };
>>
>>          packages:
>>              "$(package_list)"
>>                  comment         =>  "Install the ldap software packages",
>>                  package_policy    =>  "add",
>>                  package_method    =>  "$(package_method)",
>>                  classes           =>  if_ok("software_ok");
>> }
>>
>> --
>> ********************************************************************
>> *  Bas van der Vlies                    e-mail: b...@sara.nl       *
>> *  SARA - Academic Computing Services   Amsterdam, The Netherlands *
>> ********************************************************************
>> _______________________________________________
>> Help-cfengine mailing list
>> Help-cfengine@cfengine.org
>> https://cfengine.org/mailman/listinfo/help-cfengine
>>
>
>
>


-- 
********************************************************************
*  Bas van der Vlies                    e-mail: b...@sara.nl       *
*  SARA - Academic Computing Services   Amsterdam, The Netherlands *
********************************************************************
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to