On 09/03/2014 06:32 PM, Khoury Brazil wrote:
> Sorry for the delay Felix. Here's a specific example of a situation
> where the fact might return what I would consider useless information
> and I would want to revert back to a the value set previously:
>
> On OS X you can have an active user that is at the console and owns
> /dev/console. If you want to gather that information it's fairly
> straightforward. But under certain circumstances the owner of the
> console is root. In that scenario I'd still want the data set on the
> fact prior to that to persist. My thinking is that I can just validate
> the data returned (within the plugin itself) and if it doesn't meet my
> criteria, I can set the fact to itself using Facter.value(console_user).

So have you tried that?

I would assume that all you achieve by calling Facter.value from within
the fact's own setcode block is an endless loop.

I know of no internal cache for fact values that have been evaluated
earlier.

Even if there were such a thing, how would it work if the "root" case is
it during Facter's first execution?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/540786E1.4020004%40Alumni.TU-Berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to