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 -- 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 puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.