On Mar 30, 2012, at 3:25 AM, Koaps wrote: > Hi guys, > > I hope this is the right place for this, I was sure if the users group > would have the insight needed to answer my question. > > I'm trying to get the return values from > Puppet::SSL::CertificateAuthority apply method and for the life of me > I can't figure it out. > > I'm basically following how puppetca runs via the gems install: > > require 'rubygems' > require 'puppet/application/cert' > > pac=Puppet::Application::Cert.new > pac.subcommand='list' > pac.all=1 > pac.setup > pac.main > > but I can't get the data from pac.main, the return value just gives me > nil. > > I'm not super versed in Ruby so i'm not sure what > Puppet::SSL::CertificateAuthority::Interface is giving me here: > > return send(method, ca) if respond_to?(method) > > (subjects == :all ? ca.list : subjects).each do |host| > ca.send(method, host) > end
I expect you'll find what you want in Puppet::Face::Certificate, rather than Puppet::Application::Cert. The Applications are really meant to be used on the CLI, while the Faces are meant to be used in ruby. It's also much better documented and should be easier to understand. -- Luke Kanies | http://about.me/lak | http://puppetlabs.com/ | +1-615-594-8199 -- 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.
