On Friday, April 26, 2013 12:06:54 AM UTC-5, Andriy Yurchuk wrote:
I'm writing a custom Puppet service provider and I need to access one of my facts value inside provider to then be able to use the value inside startcmd/stopcmd. There is a confine which can test whether a fact exists, but how do I actually get the value of the fact?
As far as I know, providers do not have direct access to node facts. They run on the target node, not on the master, so they cannot draw data from the master's environment unless it is provided to them via resource parameters. On the other hand, providers can (and often do) directly interact with the target node to obtain any information they need. Although it would be roundabout, your provider could probably even use Facter to (re-)compute the data you want.
John