diff options
author | Richard Crowley <r@rcrowley.org> | 2011-03-23 22:41:21 +0000 |
---|---|---|
committer | Richard Crowley <r@rcrowley.org> | 2011-03-23 22:41:21 +0000 |
commit | 635751d809af309c7c36c0c9d7a94a731ef8bd1c (patch) | |
tree | 0cdbfafe6f2254159a22a0c979737d52db72fdbd /lib/puppet/interface | |
parent | 961c7163f336c0dd96f7f72122af9155e1a2260a (diff) | |
download | puppet-635751d809af309c7c36c0c9d7a94a731ef8bd1c.tar.gz puppet-635751d809af309c7c36c0c9d7a94a731ef8bd1c.tar.xz puppet-635751d809af309c7c36c0c9d7a94a731ef8bd1c.zip |
Propagating an argument to search out of core.
Puppet::SSL::Host.search (which will proxy to the new indirection) accepts an array of classes (now also class names) to limit the search. Currently, `puppet certificate list` limits itself to certificate requests to mimic the behavior of `puppet cert -l`.
Diffstat (limited to 'lib/puppet/interface')
-rw-r--r-- | lib/puppet/interface/certificate.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/puppet/interface/certificate.rb b/lib/puppet/interface/certificate.rb index 5c06cdc29..86ac6d6ea 100644 --- a/lib/puppet/interface/certificate.rb +++ b/lib/puppet/interface/certificate.rb @@ -13,10 +13,9 @@ Puppet::Interface::Indirector.interface(:certificate) do action :list do invoke do - Puppet::SSL::Host.indirection.search("*").each do |host| - puts host.inspect - end - nil + Puppet::SSL::Host.indirection.search("*", { + :for => :certificate_request, + }).map { |h| h.inspect } end end |