That's actually really creative.  =)  Bonus points to you sir!

On 6/29/11 8:54 PM, "Aleksey Tsalolikhin" <atsaloli.t...@gmail.com> wrote:

> On Tue, Jun 28, 2011 at 7:04 AM,  <no-re...@cfengine.com> wrote:
>> Forum: Cfengine Help
>> Subject: Re: Client config examples (update.cf / failsafe.cf) for multiple
>> Master Policy Servers
>> Author: msvob...@linkedin.com
>> 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
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to