On Tuesday, October 8, 2013 4:31:17 AM UTC-5, Paul Oyston wrote:
>
> Hi Wolf,
>
> Thanks for that diagram, that's incredibly helpful.
>
> It seems a bit of an oversight not to allow facts to be updated during the 
> manifest phase since manifests are making changes to the system and 
> therefore potentially modifying facts during their run.
>


You need to better understand the operational model.  Puppet evaluates the 
manifests provided to it in light of a target node identity and a set of 
facts to compute, all in advance, details of the desired state of the 
target node.  The result is packaged in a compiled form -- a catalog -- and 
handed off to the client-side Puppet runtime for those computed state 
details to be ensured.

Puppet uses fact values only during catalog compilation, before it changes 
anything about the target node.  They can be interpolated into resource 
properties, such as file names or content, but their identity is thereby 
lost.  Changing or setting fact values in PuppetDB during catalog 
application will not have any effect on the catalog application process, 
except that in principle you could apply Exec resources that perform 
PuppetDB queries and do something dependent on the result.

 

> I might look into modifying the agent run so that facts can be updated 
> during the manifest phase using a custom function of some description.
>


Puppet functions run during catalog compilation, not during catalog 
application, so that particular approach wouldn't work.  Even if you could 
make it work, you could not thereby modify the catalog run during catalog 
application.

These are not the hooks you're looking for.
 

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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to