[Puppet Users] Is paramater ordering non-deterministic?

2012-04-16 Thread Robert Rothenberg
I've run into the following issue with parameters that are dependent on each other. Suppose I have the following class: class foo( $owner, $prefix = /opt/${owner}, $etc_dir = ${prefix}/etc ) { file{${etc_dir}: ensure = directory, owner = $owner, group =

Re: [Puppet Users] Is paramater ordering non-deterministic?

2012-04-16 Thread Henrik Lindberg
The evaluation order of the parameters is not deterministic as I learned when implementing validation of references in Geppetto. (BTW, Geppetto issues warnings/errors when trying to reference potentially uninitialized variables as in your example). You need to move the logic computing the

Re: [Puppet Users] Is paramater ordering non-deterministic?

2012-04-16 Thread Robert Rothenberg
So will the setting of the values for $owner and $prefix be deterministic, when set inside a class or resource definition? Also, what if I want to be able to override these with user settings? (That's one of the reasons that they are parameters in the first place.) On Monday, April 16, 2012

Re: [Puppet Users] Is paramater ordering non-deterministic?

2012-04-16 Thread Nan Liu
On Mon, Apr 16, 2012 at 6:22 AM, Robert Rothenberg rob...@gmail.com wrote: So will the setting of the values for $owner and $prefix be deterministic, when set inside a class or resource definition? Yes. The issue with parameters in class declaration is described in further details here: