Felix Cheers for the quick response...
Makes sense.. I'm using 'validate_absolute_path' in the manifests [1] so looks like I'm just being over-zelous on my validation... :) Cheers Gavin [1] https://github.com/fatmcgav/fatmcgav-glassfish/blob/develop/manifests/create_cluster.pp#L57 On Friday, 27 June 2014 16:01:11 UTC+1, Felix.Frank wrote: > > Hmm, I don't think a validate hook of any type parameter should take the > system state into account. > > You should use it to make sure that whatever value was passed is > conceivably a fully qualified file name, but no more. > > A missing file should lead to more of a "runtime" type of error, i.e. > properties that rely on a sound value will fail their sync or retrieve > actions. The Puppet transaction will deal with that while running. No > need to try and spoil it with overzealous initialization time checks. > > Hope that makes sense, cheers, > Felix > > On 06/27/2014 04:54 PM, Gavin Williams wrote: > > Afternoon all, > > > > I've just hit an issue with my Puppet-Glassfish module, where I'm using > > Type param validation to check for file existence on the client - > > typically on files that are also defined earlier in the catalogue, but > > have not yet been applied to the client. > > An example is [1], with the file it's validating being created in [2]. > > > > However on the first run, the validation is rightly blowing out due to > > the file not existing - but it would by the time the resource was called > > if the puppet run proceeded... > > > > Is there a way of handling this validation dependency scenario in a more > > Puppet friendly method? > > As I'd like to retain the validation logic if possible, just to allow > > for more robust error handling... > > > > Cheers > > Gavin > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a6058d04-4f96-4492-a0f9-366660dcdaac%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
