> On 08.12.2009 11:31, Andrew Schulman wrote:
> > I added some text to
> > http://reductivelabs.com/trac/puppet/wiki/FunctionReference.  It explains 
> > that
> > functions get evaluated at compile time, before execution time, and that 
> > this
> > matters if you're using functions whose values depend on the results of your
> > manifests.
> >
> > http://reductivelabs.com/trac/puppet/wiki/FunctionReference?action=diff&version=26&old_version=25
> >
> > I'd appreciate it if someone would check the accuracy of what I wrote, and 
> > if
> > it's deemed to be accurate and useful, apply it upstream so that it will 
> > stay in
> > the wiki.
> 
> 
> Not quite: The functions are actually evaluated on the server. You 
> example of using file($path) and file { $path: ... } will never work, 
> since the file() function will read $path on the puppetmaster, while the 
> File[$path] resource will manage $path on the client.

Well, not never.  It works if it's run on the puppetmaster, which is the case I
actually was thinking of and where I first encountered the problem.  It's also
the case if you run a puppet script standalone with /usr/bin/puppet.

But you're right of course that the statement needs to be make clear that
functions are evaluated on the puppetmaster.  I'll think on that.

Thanks,
Andrew.

--

You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.


Reply via email to