On Oct 25, 2:36 am, Daniel Pittman dan...@rimspace.net wrote:
I see Matthew's concerns about security, but I'd argue you simply wouldn't
take input that gets used in actual commands. Facter doesn't do this, and a
wrapper script wouldn't either.
That's a good point and has started me thinking about how I could
implement this... :)
For my site I would probably deploy this as /etc/cron.d/get-facts:
*/15 * * * * root /usr/bin/facter --puppet --yaml /var/tmp/facts.yaml
Then you could parse that YAML file as whatever user at whatever time, without
having to worry about root access to collect them or whatever.
Hmmm, I'm currently thinking along the lines of:
=-=-=-=-=-=-=-=-=-=
import os
import yaml
cmd = facter --puppet --yaml
facts_dict = yaml.load(cmd)
# Do x with facts
=-=-=-=-=-=-=-=-=-=
(...or just use mcollective :)
LOL, we're already using MCollective, this is for a project I'm
working on that will (eventually) enable us to interface MCollective
with other languages from a client-basis, not just an agent.
Cheers,
M.
--
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.