On Tuesday 09 Nov 2010 15:06:28 Pieter Baele wrote: > Hi, > > I would like to query the puppetmaster (or the puppet nodes...) for some > facts and display/use these in an external web application (written > django) using the certificates from Puppet. > > What's the correct (nice) way to do this? REST? > Can I find some code examples for this? Hi,
I'm looking at doing a similar thing for Edison [0] (also written in Django!). For the moment, I've written "pyfacter" - a basic python wrapper around the command line [1] - however I'd like to improve on this if possible. One thing I was planning on looking at was writing a python client for MCollective and using the audit tools available as part of MC to collect the facts either into a database or at runtime but that requires the ability to use Python with MC (nudge @rip :P) The only other solution I can think of is a cronjob that runs on each host on a regular basis and posts/puts to an API to fill the relevant field in the database. Kind regards, Matt [0] https://github.com/proffalken/edison [1] https://github.com/proffalken/randomscripts/tree/master/puppet/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.