For anyone else wanting to do something similar:

For now I've just used the postrun_command on the puppet agents so that the 
facts will be uploaded to the server once modifications have been made.

e.g. postrun_command "puppet facts upload"

This will then re-upload the facts once the puppet agent has run, giving it 
the most up to date information for anything querying PuppetDB. I really 
cannot understand for the life of me why this isn't the default 
functionality, it seems ludicrous that a tool designed to report facts back 
to the master would have out of date information once puppet has modified 
the system.

On Tuesday, 8 October 2013 10:31:17 UTC+1, 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. 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.
>
> I was looking into calling exec to use "puppet facts upload". But this for 
> some reason errors out during the puppet run even after auth.conf has been 
> modified to allow the save call from nodes, it does work directly on the 
> command line though which I assume is something to do with a lock or 
> environment variable that differs during the agent run.
>
> On Monday, 7 October 2013 15:36:01 UTC+1, Wolf Noble wrote:
>>
>> Hi Paul,
>>
>> Here's a diagram showing how the puppet run process flows:
>> http://www.aosabook.org/images/puppet/TimingDiagram.png
>>
>> as you can see, facter is run exactly once, before the catalog is created.
>>
>> facter is not invoked again until the next run. I suppose you could have 
>> your sshkey resource notify the puppet service, which would subsequently 
>> trigger another run.
>>  
>

-- 
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 post to this group, send email to [email protected].
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