Worked fine. Thanks :-)

--
Emil

-----Original Message-----
From: Nakarin Phooripoom [mailto:mynameisje...@gmail.com] 
Sent: torsdag den 27 maj 2010 10:23
To: Assarsson, Emil
Cc: help-cfengine
Subject: Re: global vars in bundle common not in scope for body?

Global variables can be access by writing $(bundle.variable). Please try;

body copy_from secopy(from)
{
   source      => "$(globals.sourcebase)/$(from)";
   servers     => { @(globals.servers) };
   compare     => "digest";
   encrypt     => "true";
   trustkey    => "true";
}

Cheers,
--Nakarin

On May 27, 2010, at 9:50 AM, Assarsson, Emil wrote:

> Hi,
> 
> Shouldn't the global vars be in scope for the copy_from body? Can't make it 
> work:
> 
> bundle common globals
> {
>    vars:
>        "servers" slist => { "cfe01.intra.net" };
>        "sourcebase" string => "/srv/cfe";
> }
> 
> 
> body copy_from secopy(from)
> {
>    source      => "$(sourcebase)/$(from)";
>    servers     => { @(servers) };
>    compare     => "digest";
>    encrypt     => "true";
>    trustkey    => "true";
> }
> 
> 
> 
> 
> 
> Best regards
> 
> Emil Assarsson
> Sony Ericsson Mobile Communications AB
> 
> "The information in this email, and attachment(s) thereto, is strictly 
> confidential and may be legally privileged. It is intended solely for the 
> named recipient(s), and access to this e-mail, or any attachment(s) thereto, 
> by anyone else is unauthorized. Violations hereof may result in legal 
> actions. Any attachment(s) to this e-mail has been checked for viruses, but 
> please rely on your own virus-checker and procedures. If you contact us by 
> e-mail, we will store your name and address to facilitate communications in 
> the matter concerned. If you do not consent to us storing your name and 
> address for above stated purpose, please notify the sender promptly. Also, if 
> you are not the intended recipient please inform the sender by replying to 
> this transmission, and delete the e-mail, its attachment(s), and any copies 
> of it without, disclosing it."
> 
> 
> _______________________________________________
> 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