This primarily takes Volcane's code[1], adds tests, and
splits it into multiple files. In addition, there's one commit that
makes it easier to add facts with simple values (I.e.,
Fact.add("foo", :value => "bar")).
It has support for facts in non-ruby files, using either plain test,
json, or yaml. You can also have a script that returns facts on
execution.
Things of note:
* We're defaulting to /etc/facts.d, just like the original code. The
ticket calls for this to be /etc/facter.d.
* We're defaulting to a cache file in /tmp rather than, say, /var/tmp.
This is probably fine, but worthy of note.
* We're actually supporting scripts, which seems kind of frightening,
but the original code did it, too.
* There's no way to turn this off or configure any of this at this
point.
Even with all of those caveats, the code works and is quite well tested.
1 - https://github.com/ripienaar/facter-facts/tree/master/facts-dot-d
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.