CFEngine Help: Re: Using dist for random selections

2012-01-09 Thread no-reply
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

Re: CFEngine Help: Re: Using dist for random selections

2012-01-08 Thread Daniel V. Klein
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

CFEngine Help: Re: Using dist for random selections

2012-01-08 Thread no-reply
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

CFEngine Help: Re: CFEngine Help: Re: Using dist for random selections

2012-01-07 Thread no-reply
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

CFEngine Help: Re: Using dist for random selections

2012-01-07 Thread no-reply
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,

CFEngine Help: Re: Using dist for random selections

2012-01-07 Thread no-reply
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 $(

CFEngine Help: Re: CFEngine Help: Re: Using dist for random selections

2012-01-07 Thread no-reply
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

Re: CFEngine Help: Re: Using dist for random selections

2012-01-07 Thread Nicolas Charles
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'

CFEngine Help: Re: Using dist for random selections

2012-01-07 Thread no-reply
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

CFEngine Help: Re: Using dist for random selections

2012-01-06 Thread no-reply
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 {

CFEngine Help: Re: Using dist for random selections

2012-01-06 Thread no-reply
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