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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/53AD8715.80909%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout.