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:
>
>
>
> On Thursday, February 6, 2014 9:14:12 AM UTC-6, Felix.Frank wrote:
>>
>> I see, well - this kind of problem is best tackled using custom facts I 
>> think. 
>>
>>
> ... coupled with feeding the data to your resource via a parameter or 
> property, as appropriate.
>
>
> John
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f8a5a82d-0f37-4381-9295-0e02ce700acb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to