Re: [Puppet Users] Facter facts updated at start of puppet run only?

2012-06-22 Thread Denmat


On 22/06/2012, at 21:27, Felix Frank  wrote:

> Hi,
> 
> On 06/21/2012 07:25 PM, Zach wrote:
>> Hi all,
>> 
>> I use a custom fact to determine and build custom reports on the version
>> of certain packages on a system.  If the package is updated, the fact is
>> not updated during that run, falsely reporting the previous version
>> until the next puppet run. Is there a way to make facter facts update at
>> the end of a puppet run? Or is there something else I might be overlooking?
>> 
>> Let me know if any additional info is needed.
>> 
>> Thanks,
>> Zach
> 
> This cannot really work. The reason is that facts are only sent once and
> used while the master compiles the catalog for the node. The catalog is
> sent to the agent, and it's the agent's responsibility to take action as
> required. These actions can indeed change facts. But as you correctly
> observed, this cannot influence the catalog being currently applied, but
> will only take effect on the next compilation instead.
> 
> Hope this makes things more clear.
> 
> Cheers,
> Felix
> 
> 
Awkward, but you could run a '--noop' in between or after normal runs.

Other option is query via MCollective but that is extra setup.

Den

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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.



Re: [Puppet Users] Facter facts updated at start of puppet run only?

2012-06-22 Thread Felix Frank
Hi,

On 06/21/2012 07:25 PM, Zach wrote:
> Hi all,
> 
> I use a custom fact to determine and build custom reports on the version
> of certain packages on a system.  If the package is updated, the fact is
> not updated during that run, falsely reporting the previous version
> until the next puppet run. Is there a way to make facter facts update at
> the end of a puppet run? Or is there something else I might be overlooking?
> 
> Let me know if any additional info is needed.
> 
> Thanks,
> Zach

This cannot really work. The reason is that facts are only sent once and
used while the master compiles the catalog for the node. The catalog is
sent to the agent, and it's the agent's responsibility to take action as
required. These actions can indeed change facts. But as you correctly
observed, this cannot influence the catalog being currently applied, but
will only take effect on the next compilation instead.

Hope this makes things more clear.

Cheers,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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.



[Puppet Users] Facter facts updated at start of puppet run only?

2012-06-21 Thread Zach
Hi all,

I use a custom fact to determine and build custom reports on the version of 
certain packages on a system.  If the package is updated, the fact is not 
updated during that run, falsely reporting the previous version until the 
next puppet run. Is there a way to make facter facts update at the end of a 
puppet run? Or is there something else I might be overlooking?

Let me know if any additional info is needed.

Thanks,
Zach

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/oJbJlDMx254J.
To post to this group, send email to puppet-users@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.