Forum: CFEngine Help
Subject: Re: Using dist for random selections
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,24500,24523#msg-24523
It seems like perhaps using a persistent class and a transient class in
combination would be an acceptable (perhaps even preferable) alternat
Neil-
You should look at the tests/ directory in the source tree - there are plenty
of examples of one bundle testing another :-)
What I hear you saying is that you want repeatable randomness - is that
correct? If so, store your results in a file (possibly generated by a script
in a different
Forum: CFEngine Help
Subject: Re: Using dist for random selections
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,24500,24511#msg-24511
I've been experimenting with using one bundle as a testing bundle for another.
For example, the classic configuration file, process an
Forum: CFEngine Help
Subject: Re: CFEngine Help: Re: Using dist for random selections
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,24506,24510#msg-24510
neilhwatson Wrote:
---
> I got the impression that select_class
Forum: CFEngine Help
Subject: Re: Using dist for random selections
Author: mark
Link to topic: https://cfengine.com/forum/read.php?3,24500,24509#msg-24509
Finding the right semantics for a random number generator is always a tricky
matter. Often the behaviour you want depends on the use-case,
Forum: CFEngine Help
Subject: Re: Using dist for random selections
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,24500,24508#msg-24508
It's not given me confidence. I added a counter to the loop to get a better
understanding.
neil@ettin ~/.cfagent/inputs $ for I in $(
Forum: CFEngine Help
Subject: Re: CFEngine Help: Re: Using dist for random selections
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,24506,24507#msg-24507
I got the impression that select_class was always the same for a given host. I
definitely want something random on
On 07/01/2012 11:53, no-re...@cfengine.com wrote:
> Forum: CFEngine Help
> Subject: Re: Using dist for random selections
> Author: sauer
> Link to topic: https://cfengine.com/forum/read.php?3,24500,24505#msg-24505
>
> You noticed that you have more than 10 outputs there, right? I wonder if
> rand'
Forum: CFEngine Help
Subject: Re: Using dist for random selections
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,24500,24505#msg-24505
You noticed that you have more than 10 outputs there, right? I wonder if rand's
value is remaining constant or being redefined in subsequent
Forum: CFEngine Help
Subject: Re: Using dist for random selections
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,24500,24504#msg-24504
I tried using randomint instead but got some unexpected results.
neil@ettin ~/.cfagent/inputs $ cat test.cf
body common control {
Forum: CFEngine Help
Subject: Re: Using dist for random selections
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,24500,24503#msg-24503
You can use "50" and "50.0", but the class that gets set is not canonified, and
the period screws up parsing because it's treated like a bool
11 matches
Mail list logo