hello,

I'm toying with attempting to build an alternate way to gain information about 
nodes.  I don't personally find stored confs a good idea reasons thats OT for 
this post so need something else.

I'll give a quick overview of what I want to build so you can understand the 
scope of my question.  I essentially want to use a document database to store 
facts, classes list and some other information and then make that availble to 
puppet in a query system.

in manifests:

Get a list of all my centos/redhat machines, simple array gets returned:
$nodes = search("{'facts.operatingsystem' : { \$in: ['CentOS', 'Redhat']}}")

For puppet 2.6 get a hash containing all the data for a node:
$node = node_data("{'hostname': '$name'}")

in ruby manifests and templates:

Util.search({"classes" => "apache::monitor"}).each do |node|
   # make nagios checks node will be a object holding all
   # the stored info about a node with hash like access
end

My question is how to integrate this best, i need some utility classes, i need 
a db connection that will hopefully be shared between multiple catalog compiles 
in the same master process and between various invocations of the parser 
functions, utility classes etc.  And I need configuration information - where 
to find the db.

- Ideally this would be a plugin ala plugins in modules
- Config would be ideal in puppet.conf, but I dont believe plugins can access 
random data in there, especially ones puppet has in its code base i cant extend 
it?
- I need some var/pool that is accessible by the utility classes and that holds 
open a connection to a db

Any hints?

-- 
R.I.Pienaar

-- 
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.

Reply via email to