I think custom facts would be fine for the case of JAVA_HOME of the OP. However, feeding data to the resource will not work for the self.instances method unfortunately.
Custom facts won't work either, as facts are only determined prior to the catalog compilation. At that point, the installation path is not yet available (I'm installing Tomcat through a package manager so I don't have control over the installation paths).
I ended up getting the desired path within the custom provider as follows:
ps_line = `ps -eaf | grep tomcat7`
installation_path = /catalina.base=([\S]+)/.match(ps_line)[1]
This works just fine!
Anyway, thanks a lot for the quick responses, cheers
Op donderdag 6 februari 2014 23:53:18 UTC+1 schreef jcbollinger: