To solve your pathing issue you could create a define to autocomplete the path for you.
Sent from my iPhone On Jul 27, 2010, at 11:24 AM, Rob McBroom <mailingli...@skurfer.com> wrote: > So, I’m using templates for the first time and I wanted to test the case > where the values used by the template don’t exist. I get an error like this: > > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Failed to parse template slapd_replication.erb: Could not find value for > 'slapd_consumer_rid' at > /etc/puppet/manifests/experimental/services/ldap.pp:141 on node t-corp-ldap-03 > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > > That’s fine. I want it to fail and not touch the target file (which is what > happens), but I also want to *know* it failed. The report in Puppet Dashboard > shows a successful run. I imagine the report only counts something as a > failure if it attempts to do it, but since the template can’t even be parsed, > it’s not trying. Is there some clever thing I can do to make it fail in a way > that will get reported? > > One possibility I’ve considered is to check for the variable in the template > and set an invalid default if it’s missing, which will kill LDAP services on > that node. While that would certainly get noticed, I’d prefer something less > extreme. > > And a related question: I’d like to store templates in the same directory > that 'puppet://puppet/files/' points to, but I don’t want to hard-code the > path in my manifests. Is there a variable that refers to that path? (Yeah, I > know. Modules. I’m not using them and not planning to any time soon, so any > other ideas would be appreciated.) > > Thanks. > > -- > Rob McBroom > <http://www.skurfer.com/> > > Don't try to tell me something is important to you if the whole of your > “support” entails getting Congress to force *others* to spend time and money > on it. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-us...@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.