Nigel Kersten <ni...@explanatorygap.net> writes: > On Sun, Oct 24, 2010 at 5:23 AM, Daniel Pittman <dan...@rimspace.net> wrote: >> Matthew Macdonald-Wallace <li...@truthisfreedom.org.uk> writes: >>> On Sun, 2010-10-24 at 00:44 -0700, Yushu Yao wrote:
[...] >> I think what you probably want is 'facter --yaml', which emits the data in >> a format easily consumed by other applications. Wrap, or cache, or process >> that from your Python library and you have a nice, language independent way >> to get that data. >> >> Which is essentially what you want, right? > > I think so. You'll want to work out how to simulate the '-p/--puppet' > option, but otherwise it's all just going to be yaml parsing. > > 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. 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. (...or just use mcollective :) Daniel -- ✣ Daniel Pittman ✉ dan...@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- 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.