On Tue, Jun 28, 2011 at 7:04 AM, <[email protected]> wrote:
> Forum: Cfengine Help
> Subject: Re: Client config examples (update.cf / failsafe.cf) for multiple
> Master Policy Servers
> Author: [email protected]
> Link to topic: https://cfengine.com/forum/read.php?3,22618,22640#msg-22640
>
> select_class was introduced in 3.1.5. So before the most recent version, how
> were folks accomplishing this? Most of my infrastructure is still on 3.1.4
> b/c of the BerkeleyDB issue. I suppose I'm in the holding pattern for 3.1.6
> to use this...
Hi, Mike. How does this look?
Best,
-at
{{{
# use two remote servers, and round-robin between them
bundle agent copy
{
classes:
"flip_a_coin__heads"
expression => isgreaterthan(randomint(1,100), 50);
files:
"/tmp/test1copy"
copy_from => cp("/tmp/testfile1", "host1", "host2");
}
body copy_from cp(from,server1, server2)
{
flip_a_coin__heads::
servers => { "$(server1)", “$(server2)” };
!flip_a_coin__heads::
servers => { "$(server2)", “$(server1)” };
source => "$(from)";
}
}}}
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine