Ok, I was mistaken. Returning a hash works. It would be helpful if the ruby exceptions bubbled up to puppet reported the correct line number from the ruby source -- if that is possible.
Rich On Mon, Feb 7, 2011 at 4:18 PM, Rich Rauenzahn <rraue...@gmail.com> wrote: > We have a command line utility that queries a database to get certain > facts about our hosts -- I wanted to write a custom function to obtain > all of those facts at once. The tool outputs JSON and I wanted to > take that output and return a hash back into puppet where I could > access the facts like... > > $a = host_info() > > if $a['in_maintenance'] == 'yes' { > } ... -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@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.