[Puppet Users] Autorequire based on resource property???

2014-02-07 Thread Gavin Williams
Morning all I'm trying to work out if it's possible to add auto-require logic to some of my Glassfish module[1] types. From what I've read about *autorequire*, the standard usage is to match to a resource title, as used here[2]. However the challenge I'm hitting is that I don't know the title

Re: [Puppet Users] Autorequire based on resource property???

2014-02-07 Thread Felix Frank
Hi, I suppose that should be possible, although the autorequire block will be a lot more complex than those you're using right now (obviously, since those are almost trivial - in a good way :-) You can filter the list of all resources in the catalog for interesting things to autorequire. This

Re: [Puppet Users] Autorequire based on resource property???

2014-02-07 Thread Gavin Williams
Felix Thanks for the pointers there... As discussed on #puppet-dev, I've managed to get it working with the following code: https://gist.github.com/fatmcgav/8864343 However it does raise the question of Is this the most optimal method to handle this scenario? As it means iterating the