Re: [Puppet-dev] Referencing other resources in parameters

2013-09-03 Thread Tom Linkin
Just an update for everyone. The problem with validating that the referenced resource is in the catalog now has a solution (for the most part). You’d need to take advantage of the new `post_compile_hook` that should be supported in future versions of Puppet. I may write up a helper module later

Re: [Puppet-dev] Referencing other resources in parameters

2013-08-27 Thread Andy Parker
On Mon, Aug 26, 2013 at 5:38 PM, Thomas Linkin wrote: > There is a hook for types that gets called when catalog compilation is > complete, but it then only calls the relationship params giving them a > chance to resolve their relationships. I'm currently working on a pull > request to change that

Re: [Puppet-dev] Referencing other resources in parameters

2013-08-26 Thread Thomas Linkin
> > There is a hook for types that gets called when catalog compilation is > > complete, but it then only calls the relationship params giving them a > > chance to resolve their relationships. I'm currently working on a pull > > request to change that situation though. > > > > Could you give s

Re: [Puppet-dev] Referencing other resources in parameters

2013-08-26 Thread Andy Parker
On Sat, Aug 24, 2013 at 8:09 PM, Tom Linkin wrote: > Dominic, > > I have done this before: https://github.com/trlinkin/puppet-file_param > > A few other things have done this as well. Usually it is when there is a "resource" that is needed to manage another resource, but isn't a resource itself

Re: [Puppet-dev] Referencing other resources in parameters

2013-08-24 Thread Tom Linkin
Dominic, I have done this before: https://github.com/trlinkin/puppet-file_param You're right in assuming you will need to access the referenced resource during catalog application time. The only issue is that there is no way to know if the referenced resource is actually in the catalog until c

Re: [Puppet-dev] Referencing other resources in parameters

2013-08-23 Thread Dominic Cleal
On 21/08/13 21:12, Trevor Vaughan wrote: > Interesting. I was thinking that he would be using the resource as part > of a type value. I suppose if you pass it directly to the provider it > would work but it seems that any manipulation in the type itself > wouldn't work. > > Happy to be wrong thoug

Re: [Puppet-dev] Referencing other resources in parameters

2013-08-21 Thread Trevor Vaughan
Interesting. I was thinking that he would be using the resource as part of a type value. I suppose if you pass it directly to the provider it would work but it seems that any manipulation in the type itself wouldn't work. Happy to be wrong though. Trevor On Wed, Aug 21, 2013 at 2:21 PM, Dan Bod

Re: [Puppet-dev] Referencing other resources in parameters

2013-08-21 Thread Dan Bode
I've done it before and didn't have any problems. On Wed, Aug 21, 2013 at 11:15 AM, Trevor Vaughan wrote: > This probably won't do what you want in all cases as it will probably be > manifest parse order dependent. > I'm not sure what part you are saying would be parse order dependent. Referenc

Re: [Puppet-dev] Referencing other resources in parameters

2013-08-21 Thread Trevor Vaughan
This probably won't do what you want in all cases as it will probably be manifest parse order dependent. See my post on types and providers at https://www.onyxpoint.com/?p=202 for processing order details based on observation. Thanks, Trevor On Wed, Aug 21, 2013 at 4:55 AM, Dominic Cleal wrot

[Puppet-dev] Referencing other resources in parameters

2013-08-21 Thread Dominic Cleal
Hi all, A bit of an open-ended question, but has anybody designed custom types with parameters that reference other resources? Are there any 'gotchas' to be aware of, or functionality that this can break? The types in this case are for SSL certificate handling and the thought is to have a type r